Optogenetic control of the lac operon for bacterial chemical and protein production