You can, but it all depends. As mentioned already, if you have rim brakes, forget about it.
I've experimented with 26" MTB wheels on my 700x40mm stock bike. It made the bike more nimble but also more prone to pedal strikes (it also comes with 180mm cranks, that doesn't help)