Not to mention that the Enterprise, according to A Taste of Armageddon and General Order 24, has enough firepower to lay waste to several planetary cities. Surely this would be enough firepower to break the asteroid up into smaller, manageable pieces that would burn up upon entry.
Everything else you said makes sense, but not this. If you break up an asteroid into smaller chunks, it doesn't make much difference, because you've still got the same amount of mass entering the atmosphere. Even if most of it does burn up, that's still a vast amount of thermal energy added to the atmosphere, and that could be just as devastating. Not to mention that even a few big surviving chunks hitting the planet could still cause global devastation.
The problem is that people tend to think of this in terms of material, the physical substance of the asteroid, when in fact it's the energy that's the real problem. It's the energy -- kinetic, potential, thermal, whatever -- that's delivered to the planet by the asteroid that does the damage. And that energy isn't going to cease to exist just because the material of the asteroid changes form.
So blowing up an asteroid is the worst possible way to deal with it -- unless you can detonate it asymmetrically and impart enough thrust to push the center of mass of the debris onto a different trajectory so it misses the planet altogether. Still, though, those chunks are still going to be there and pose a potential impact hazard on future orbits. As a rule, the best way to reduce the risk from space debris is not
by creating more debris. There are smarter ways to divert an asteroid's trajectory while leaving it reasonably intact.
Another problem with your premise is that the surface of a planet is just a very, very thin film on the outside of it. A starship with the firepower to destroy cities, even to sterilize the surface of a planet, wouldn't cause any damage at all to the physical, geological structure of the planet itself, and thus wouldn't be able to do much damage to a large asteroid (and it would have to be very large if they couldn't divert it in 2 months). It's like the difference between the force required to erase grafitti from a stone wall and the force required to shatter the wall.