Genetically encoded calcium indicators and optogenetic actuators can report and manipulate the activity of specific neuronal populations. However, applying imaging and optogenetics simultaneously has been difficult to establish in the mammalian brain, even though combining the techniques would provide a powerful approach to reveal the functional organization of neural circuits. Here, we developed a technique based on patterned two-photon illumination to allow fast scanless imaging of GCaMP6 signals in the intact mouse brain at the same time as single-photon optogenetic inhibition with Archaerhodopsin. Using combined imaging and electrophysiological recording, we demonstrate that single and short bursts of action potentials in pyramidal neurons can be detected in the scanless modality at acquisition frequencies up to 1 kHz. Moreover, we demonstrate that our system strongly reduces the artifacts in the fluorescence detection that are induced by single-photon optogenetic illumination. Finally, we validated our technique investigating the role of parvalbumin-positive (PV) interneurons in the control of spontaneous cortical dynamics. Monitoring the activity of cellular populations on a precise spatiotemporal scale while manipulating neuronal activity with optogenetics provides a powerful tool to causally elucidate the cellular mechanisms underlying circuit function in the intact mammalian brain.