Optical control of repetitive firing