Laser-Compton x-ray sources have many advantages over traditional x-ray tubes for use in medical imaging due to their monoenergetic energy spectrum, tunability, high-flux, and low-dose potential. These properties can specifically be taken advantage of in the context of K-edge subtraction (KES) imaging. Previous optimization approaches are time-consuming by scanning over high-dimensional parameter spaces. Here, we show how a Bayesian optimization routine optimizes LCS source parameters in only a fraction of the computational time. Using this approach, we found a configuration that produces non-inferior image quality in KES mammography compared to a previously optimized direct energy tuning technique. Moreover, a successfully optimized implementation of scanning K-edge subtraction imaging was realized applying this Bayesian approach.