Optical techniques for integrated control and recording of neural activity