Optically activated semiconductors as repetitive opening switches