To reversibly manipulate neural circuits with increased spatial and temporal control, photoswitchable ligands can add an optical switch to a target receptor or signaling cascade. This approach, termed photopharmacology, has been enabling to molecular neuroscience, however, its application to behavioral experiments has been impeded by a lack of integrated hardware capable of delivering both light and compounds to deep brain regions in moving subjects. Here, we devise a hybrid photochemical genetic approach to target neurons using a photoswitchable agonist of capsaicin receptor (TRPV1), red-AzCA-4. Using the thermal drawing process we created multifunctional fibers that can deliver viruses, photoswitchable ligands, and light to deep brain regions in awake, freely moving mice. We implanted our fibers into the ventral tegmental area (VTA), a midbrain hub of the mesolimbic pathway, and used them to deliver a transgene coding for TRPV1. This sensitized excitatory VTA neurons to red-AzCA-4, and allowed us to optically control conditioned place preference using a mammalian ion-channel, thus extending applications of photopharmacology to behavioral experiments. Applied to endogenous receptors, our approach may accelerate studies of molecular mechanisms underlying animal behavior. AUTHOR CONTRIBUTIONS JAF and PA conceived and coordinated the study. DBK synthesized the photoswitchable compounds. JAF and GR carried out imaging experiments in cultured neurons. JAF, MJA, and IG fabricated and characterized the multifunctional fibers. YF aided in fiber design. PC and FK produced lentiviral vectors. JAF, MJA, PC, AC, and IG performed immunohistochemical experiments. JAF and MJA performed the behavioral experiments. PC, AC, MJA, and JAF wrote scripts for data analysis. JAF, MJA, and PA wrote the manuscript with input from all co-authors.