Optogenetics with microbial opsin genes has enabled high-speed control of genetically specified cell populations in intact tissue. However, it remains a challenge to independently control subsets of cells within the genetically targeted population. Although spatially precise excitation of target molecules can be achieved using two-photon laser-scanning microscopy (TPLSM) hardware, the integration of two-photon excitation with optogenetics has thus far required specialized equipment or scanning and has not yet been widely adopted. Here we take a complementary approach, developing opsins with custom kinetic, expression and spectral properties uniquely suited to scan times typical of the raster approach that is ubiquitous in TPLSMlaboratories. We use a range of culture, slice and mammalian in vivo preparations to demonstrate the versatility of this toolbox, and we quantitatively map parameter space for fast excitation, inhibition and bistable control. Together these advances may help enable broad adoption of integrated optogenetic and TPLSMtechnologies across experimental fields and systems.