Many evolutionarily successful bacteria attain high growth rates across growth-permissive conditions. They express metabolic networks that synthesise all cellular components at a high rate. Metabolic reaction rates are bounded by the concentration of the catalysing enzymes and cells have finite resources available for enzyme synthesis. Therefore, bacteria that grow fast should express needed metabolic enzymes at precisely tuned concentrations. To maintain fast growth in a dynamic environment, cells should adjust gene expression of metabolic enzymes. The activity of many of the associated transcription factors is regulated by their binding to intracellular metabolites. We study optimal metabolite-mediated regulation of metabolic-gene expression that preserves maximisation of metabolic fluxes across varying conditions. We logically derive the underlying control logic of this type of optimal regulation, which we term “Specific Flux (q) Optimization by Robust Adaptive Control” (qORAC), and illustrate it with several examples. We show that optimal metabolic flux can be maintained in the face of K changing parameters only if the number of transcription-factor-binding metabolites is at least equal to K. qORAC-regulation of metabolism can generally be achieved with basic biochemical interactions, indicating that metabolism can operate close to optimality. The theory that we present is directly applicable to synthetic biology, biotechnology and fundamental studies of the regulation of metabolism.