Optical Switching Based on the Conditional Faraday Effect With Electron Spins in Quantum Dots