Calculation of the superconducting transition temperature Tc for metals with phonon-anomalies