Can I use a 50 amp range cord to connect a new dryer to a 50 amp receptacle?
The dryer could pull 50 amps if it malfunctions or sustains damage. Use a breaker that's appropriate for the equipment. 

Why would you change the cord and not the receptacle? It probably violates code to use a cord with the 50-amp configuration on a 30 amp circuit. Someone down the road could plug a range back in and have an overload situation.

Change the breaker and the receptacle.