Production of fats or fatty oils from raw materials