Electrostatic control of photoisomerization pathways in proteins