Quantitative studies of the optical and UV spectra of Galactic early B supergiants - I. Fundamental parameters