Can I use Time Machine to restore MacBook Pro after replacing hard drive?
Yes, I just did the same myself last week, though I'd recommend using a cloner (like Carbon Copy Cloner). 

If you are using a Time Machine backup, it would be better to install the operating system onto the drive, run all updates, then use Migration Assistant to bring all your stuff across, effectively a 'clean' install.