Molecular Optoelectronic Gates