Increasing the engine thermal efficiency, while maintaining or reducing exhaust emissions, has been, and remains to be, one of the main goals in engine design. Efficiency improvements can be achieved by carefully attending to just about any part or parameter of the engine.
Therefore, this question is difficult to answer without knowing what we have to work with. First, what are the fuels, and what is the application? Second, what modifications to engine hardware and settings are allowed? Third, how much time and money are available for this?
For example, if I need to burn some cheap crappy biogas (which would not combust in a spark ignition engine), in a combined heat and power unit, I would start with a successfully designed diesel engine with reasonable parameters including emissions and efficiency. Then I would attend to the combustion as recommended by Maciej Mikulski, optimizing the pilot injection dose, pressure, and timing, and optimizing the air-fuel ratio - in the course, you might find that you would benefit from different injectors and different turbocharger.