Opto-electronic feedback control of membrane potential for real-time control of action potentials