Optogenetic regulation of engineered cellular metabolism for microbial chemical production