Dual-specificity methyltransferase that catalyzes the formation of 5-methyluridine at position 54 (m5U54) in all tRNAs, and that of position 341 (m5U341) in tmRNA (transfer-mRNA). S-adenosyl-L-methionine + uridine(54) in tRNA = 5-methyluridine(54) in tRNA + H(+) + S-adenosyl-L-homocysteine S-adenosyl-L-methionine + uridine(341) in tmRNA = 5-methyluridine(341) in tmRNA + H(+) + S-adenosyl-L-homocysteine Belongs to the class I-like SAM-binding methyltransferase superfamily. RNA M5U methyltransferase family. TrmA subfamily.