There is growing interest in designing spatiotemporal control over enzyme activities using noninvasive stimuli such as light. Here, we describe a structure-based, computation-guided predictive method for reversibly controlling enzyme activity using covalently attached photoresponsive azobenzene groups. Applying the method to the therapeutically useful enzyme yeast cytosine deaminase, we obtained a ∼3-fold change in enzyme activity by the photocontrolled modulation of the enzyme's active site lid structure, while fully maintaining thermostability. Multiple cycles of switching, controllable in real time, are possible. The predictiveness of the method is demonstrated by the construction of a variant that does not photoswitch as expected from computational modeling. Our design approach opens new avenues for optically controlling enzyme function. The designed photocontrolled cytosine deaminases may also aid in improving chemotherapy approaches that utilize this enzyme.