It would certainly have been a very different movie.
Originally, Chris Farley was supposed to do the voice of Shrek, and had actually recorded part of the film. Some people inside the film quietly said that Mike Meyers interpretation of the character improved the movie significantly. Farley was out of control all the time, and in Tommy Boy, his transformation from "out of control" bad salesman to good salesman didn't show much difference. The wild stuff was funny, but he couldn't really tone it down. The same would have been true in Shrek. He would have done the wild stuff fine, but I don't think he could have converted to the gentle romantic, or have provided much depth to the character.