Long-term model predictive control of gene expression at the population and single-cell levels