No. Even though he's been in two of Bay's flicks, no.
His notoriety would override the Transformers themselves, and that would just cause a nerdrage with the explosive power of an atomic bomb, because the fandom would end up hating him due to Optimus having to take a backseat to him in terms of screen time and what not.
Plus, it would drag down his career. With
ROTF receiving such negative reviews bordering on hatred, TF3 most likely won't be well received either, and the critics will try and shame him for being a part of the franchise with quips like "Oh Fresh Prince, how the mighty have fallen" or something equally lame. The box office will probably be ginormous (especially if
ROTF continues to do as well as it has been), but beyond that, it would most likely have a negative effect on his career.
Transformers is great for making new, notable film stars (Shia, Megan, Tyrese), reviving old, somewhat dimming careers (John Turturro, Josh Duhamel), but to include someone like Will Smith will just be bad. It'll look like they're throwing him in to save a sinking ship, or a risky ploy to make TFs bigger on the big screen. Neither one will be well received.
Do I think he'd be great in it? Sure. He'd be funny, he's proven he's good with alien flicks, and his name would certainly turn some heads, but he's too big for it, and while
ROTF is excellent, the chances of topping it are pretty slim, and we could end up with another TF07 on our hands, and it's not fair to put him in something like that.