laser diode optical gate switch