After photons enter the eye, neurons transduce them into patterns of spikes that propagate through the brain until we visually perceive them. We and other animals do this quickly and reliably, but the specific qualities of the spike trains that lead to perception remain elusive. Using optogenetics to perturb these patterns of spikes as they flow through the visual system offers experimenters the unique opportunity to understand which neurons contribute to perception and when their activity is most critical. In mice trained in a visual detection task, we optogenetically excited inhibitory interneurons in primary visual cortex to test which periods contained the most important spikes for performing the task. We employed white noise optogenetic stimulation—a random Bernoulli process of optogenetic stimulation—that allowed us to attain an unbiased, high-resolution picture of when optogenetic stimulation affected behavior. A reverse correlation analysis was performed on the optogenetic time courses that led to a successful detection of the stimulus, yielding an optogenetic-behavioral kernel. We performed acute electrophysiological recordings to understand how the optogenetic-behavioral kernel relates to patterns of sensory evoked spiking in V1. With this optogenetic-behavioral kernel derived from white noise optogenetic stimulation in the context of two different visual stimuli, we determined the time course of V1 readout is biased toward the earliest stimulus-evoked spikes. These data demonstrate the power of white noise stimulation to uncover the readout weighting of spikes from a given population.