First and foremost: just because you can turn a screwdriver doesn't mean you can do electrical work. You can't just go randomly 'upgrading' outlets, that's how house fires happen.
If you absolutely must use this in it's current state for charging, even though you really shouldn't, limit the car to 24A.
Your most cost effective solution here is to put the dryer plug back and spend the $45 on the correct adapter from Tesla.
If you really want to put a 50A outlet in, call an electrician. They're gonna have to either replace the whole circuit or install a new one. They'll have to install a 50A breaker, run 6 AWG wire, and install the 14-50 plug.