I had a sentence transformation exercise and I had to say that sentence "I'm sure it WAS Tom who cleared everything up." with (It must...) and I wrote "It must was john who cleared up everything" but it's said it's wrong and the correct answer is "It must HAVE BEEN Tom who cleared everything up.". I don't think there's a mistake even if I write "It must BE John who cleared up everything.". So, Am I wrong and why?
Because only a bare infinitive, such as be or have, can follow a modal verb such as must.
The have in must have been John is a bare infinitive. It is not a conjugated verb. There is no
*It must has been John who...
any more than there is a
*It must was John who...
Both those constructions are wrong, and I marked them with an asterisk (*) to show that they are ungrammatical.