Optoelectronic synapses