Local fluctuations in the blood oxygenation level-dependent (BOLD) signal serve as the basis of functional magnetic resonance imaging (fMRI). Understanding the correlation between distinct aspects of neural activity and the BOLD response is fundamental to the interpretation of this widely used mapping signal. Analysis of this question requires the ability to precisely manipulate the activity of defined neurons. To achieve such control, we combined optogenetic drive of neocortical neurons with high-resolution (9.4 T) rodent fMRI and detailed analysis of neurophysiological data. Light-driven activation of pyramidal neurons resulted in a positive BOLD response at the stimulated site. To help differentiate the neurophysiological correlate(s) of the BOLD response, we employed light trains of the same average frequency, but with periodic and Poisson distributed pulse times. These different types of pulse trains generated dissociable patterns of single-unit, multi-unit and local field potential (LFP) activity, and of BOLD signals. The BOLD activity exhibited the strongest correlation to spiking activity with increasing rates of stimulation, and, to a first approximation, was linear with pulse delivery rate, while LFP activity showed a weaker correlation. These data provide an example of a strong correlation between spike rate and the BOLD response. This article is part of a Special Issue entitled Optogenetics (7th BRES).