Stream flow controls physical and ecological processes in rivers that support freshwater ecosystems and biodiversity vital for services that humans depend on. This master variable has been impaired by human activities like dam operations, water diversions, and flood control infrastructure. Furthermore, increasing water scarcity due to rising water demands and droughts has further stressed these systems, calling for the need to find better ways to identify and allocate environmental flows. In this study, a linear optimization model was developed for environmental flows in river systems that have minimal or no regulation from dam operations, but still exhibit altered flow regimes due to surface water diversions and groundwater abstraction. Flow regime requirements for California Central Valley spring-run Chinook salmon (Oncorhynchus tshawytscha) life history were used as a test case to examine how alterations to the timing and magnitude of water diversions meet environmental flow objectives while minimizing impact to local water supply. The model was then applied to Mill Creek, a tributary of the Sacramento River, in northern California, and its altered flow regime that currently impacts adult spring-run Chinook spawning and migration. The resulting optimized water diversion schedule can be used to inform water management decisions that aim to maximize benefit for the environment while meeting local water demands.