A key technical barrier to furthering our understanding of complex neural networks has been the lack of tools for the simultaneous spatiotemporal control and detection of activity in a large number of neurons. Here, we report an all-optical system for achieving this kind of parallel and selective control and detection. We do this by delivering spatiotemporally complex optical stimuli through a digital micromirror spatiotemporal light modulator to cells expressing the light-activated ionotropic glutamate receptor (LiGluR), which have been labeled with a calcium dye to provide a fluorescent report of activity. Reliable and accurate spatiotemporal stimulation was obtained on HEK293 cells and cultured rat hippocampal neurons. This technique should be adaptable to in vivo applications and could serve as an optical interface for communicating with complex neural circuits.