One embodiment is directed to a method for controllably managing pain in the afferent nervous system of a patient having a targeted tissue structure that has been genetically modified to have light sensitive protein, comprising: providing a light delivery element configured to direct radiation to at least a portion of a targeted tissue structure, a light source configured to provide light to the light delivery element, and a controller operatively coupled to light source, wherein the targeted tissue structure comprises a sensory neuron of the patient; and automatically operating the controller to illuminate the targeted tissue structure with radiation such that a membrane potential of cells comprising the targeted tissue structure is modulated at least in part due to exposure of the light sensitive protein to the radiation.