Phonons and rotons in liquid 4He near the superfluid transition