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.