Lattice dynamics of the high-Tc superconductor La2−xMxCuO4