Controlled, wireless neuromodulation using miniature implantable devices is a long-sought goal in neuroscience. It will allow many studies and treatments that are otherwise impractical. Recent studies demonstrate advances in neuromodulation through optogenetics, but test animals are typically tethered, severely limiting experimental possibilities. Existing nontethered optical stimulators either deliver light through a cranial window limiting applications to superficial layers of the brain, are not widely accessible due to highly specialized fabrication techniques, or do not demonstrate robust and flexible control of the optical power emitted. To overcome these limitations, we have developed a novel, miniature, wireless, deep-brain, modular optical stimulator with controllable stimulation parameters for use in optogenetic experiments. We demonstrate its use in a behavioral experiment targeting a deep brain structure in freely behaving mice. To allow its rapid and widespread adoption, we developed this stimulator using commercially available components. The modular and accessible optogenetic stimulator presented advances the wireless toolset available for freely behaving animal experiments.