Balfour wins £565m rail contract