The blood oxygenation level-dependent (BOLD) signal serves as the basis for human functional MRI (fMRI). Knowledge of the properties of the BOLD signal, such as how linear its response is to sensory stimuli, is essential for the design and interpretation of fMRI experiments. Here, we combined the cell-type and site-specific causal control provided by optogenetics and fMRI (opto-fMRI) in mice to test the linearity of BOLD signals driven by locally induced excitatory activity. We employed high-resolution mouse fMRI at 9.4 tesla to measure the BOLD response, and extracellular electrophysiological recordings to measure the effects of stimulation on single unit, multiunit, and local field potential activity. Optically driven stimulation of layer V neocortical pyramidal neurons resulted in a positive local BOLD response at the stimulated site. Consistent with a linear transform model, this locally driven BOLD response summated in response to closely spaced trains of stimulation. These properties were equivalent to responses generated through the multisynaptic method of driving neocortical activity by tactile sensory stimulation, and paralleled changes in electrophysiological measures. These results illustrate the potential of the opto-fMRI method and reinforce the critical assumption of human functional neuroimaging that—to first approximation—the BOLD response tracks local neural activity levels.