Photon‐Gated Spin Transistor