Long-slit optical spectroscopy of powerful far-infrared galaxies - The nature of the nuclear energy source