The assessment of life cycle greenhouse gas emissions of motor fuels is important due to the legal obligations and corporate social responsibility of the petroleum industry. Combining the Life-Cycle Assessment with optimization methods can provide valuable support in the decision-making process. In this paper, a mathematical model of a refinery was developed to analyze the impact of process optimization on GHG emissions at the fuel production stage. The model included ten major refinery units. Fuel production costs were minimized by taking into account the number of constraints. The analysis was performed in two steps. First, the model was run for the reference case of fuels composition. Then, more than twelve thousand model runs were performed. In each model, the fuel composition was changed. This change represented the exogenous pressures and resulted in different flows of mass, energy and GHG emission at the refinery. The most favorable results in terms of GHG emissions were then identified and analyzed. Additionally, the impact of using low-carbon fuels for process heating was evaluated. The study showed that fuel blending management could lead to the reduction of GHG emissions by 0.4 gCO2-eq/MJ while the use of low-carbon fuel for process heating results in a reduction of GHG emissions by 2 ca. gCO2-eq/MJ.