Optimization of the transesterification reaction in biodiesel production