Optogenetics allows the manipulation of neural activity in freely moving animals with millisecond precision, but its application in Drosophila melanogaster has been limited. Here we show that a recently described red activatable channelrhodopsin (ReaChR) permits control of complex behavior in freely moving adult flies, at wavelengths that are not thought to interfere with normal visual function. This tool affords the opportunity to control neural activity over a broad dynamic range of stimulation intensities. Using time-resolved activation, we show that the neural control of male courtship song can be separated into (i) probabilistic, persistent and (ii) deterministic, command-like components. The former, but not the latter, neurons are subject to functional modulation by social experience, which supports the idea that they constitute a locus of state-dependent influence. This separation is not evident using thermogenetic tools, a result underscoring the importance of temporally precise control of neuronal activation in the functional dissection of neural circuits in Drosophila.