In this study, the combustion system of a light-duty compression ignition engine running on a market gasoline fuel with Research Octane Number (RON) of 91 was optimized using computational fluid dynamics (CFD) and Machine Learning (ML). This work was focused on optimizing the piston bowl geometry at two compression ratios (CR) (17 and 18:1) and this exercise was carried out at full-load conditions (20 bar indicated mean effective pressure, IMEP). First, a limited manual piston design optimization was performed for CR 17:1, where a couple of pistons were designed and tested. Thereafter, a CFD design of experiments (DoE) optimization was performed where CAESES, a commercial software tool, was used to automatically perturb key bowl design parameters and CONVERGE software was utilized to perform the CFD simulations. At each compression ratio, 128 piston bowl designs were evaluated. Subsequently, a Machine Learning-Grid Gradient Algorithm (ML-GGA) approach was developed to further optimize the piston bowl design. This extensive optimization exercise yielded significant improvements in the engine performance and emissions compared to the baseline piston bowl designs. Up to 15% savings in indicated specific fuel consumption (ISFC) were obtained. Similarly, the optimized piston bowl geometries produced significantly lower emissions compared to the baseline. Emissions reductions up to 90% were obtained from this optimization exercise. The performances of the optimized piston bowl geometries were further validated at different operating conditions at the high-load point and at part-load conditions (6 bar IMEP) and compared with those of the baseline designs. The dependence of the engine performance on the piston bowl geometry at part-loads was lower than that at high-loads because injections normally occurred earlier (-60 to -20 CAD after top dead center (aTDC)) where minimal interactions between the spray and piston were anticipated. The interactions between late injections (-3 to 3 CAD aTDC) and piston geometry at high-loads significantly affected, fuel-air mixing, droplet breakup, combustion and emissions. It was also observed that heat losses, dictated by the interactions between the flame and piston surface, significantly affected the performance of the engine.