wouldn't defenders be able to refract any laser attack away using lenses, and/or dissipate the heat of the attack?
This is a common misconception (here and elsewhere) in which people really don't appreciate the power levels of a practical laser weapon. That's fair enough; it isn't intuitive.
First, note that your lasers probably won't be using refractive elements, because they'll be hard to cool. Mirrors are more convenient in that regard, as you can put coolant channels on the non-business side. They also give you the ability to have deformable mirrors and so on.
Next note that the energy density at the mirror is going to be much, much lower than the energy density at the target: this should be obvious, because you don't want to incinerate your own optical path, and you don't want the enemy to be able to trivially defend themselves by simply fitting mirror armour.
As the intensity of light incident upon the target goes up, you start getting non-linear effects. One such effect is multiphoton ionisation, whereby highly intense light of longer wavelengths (say, visible) can blast the electrons off matter it interacts with. Once this starts happening to the target, no amount of magical heat-sinking will help because free electrons floating around will do bad, bad things to the chemical and crystal structure of the material. This also applies to lasers emitting ionising radiation, such as UV or X-rays, though these will be harder to engineer than longer wavelength devices.
Finally note that even for purely thermal effects, the thermal conductivity of your armour plate and structural materials is limited. Even if you have more that enough cooling capacity to keep your ship lovely and cold even in the face of a terawatt of heat, the point at which the laser hits will likely heat up faster than you can cool it down so you'll still take damage.
Some scifi settings introduce "thermal superconductors" to handle the latter, but remember that they won't save you from ionising effects!
There may be plausible ways to defend yourself effectively from laser attack, but they are even more science-fictional than practical laser weapons.
It may be possible to produce a cloud of dense cold plasma and hold it in a magnetic field on the outside of your ship. It would clearly look awesome: it glows! It could also be opaque to lasers, which would have to burn off the shield cloud first before reaching the hull, and the shield cloud could be refreshed from within the ship.
Getting the cloud dense enough, and holding it in place under strong external heating is extremely hard, but it might work. It certainly isn't the same technology needed to build your massive laser cannon... different branch of physics and engineering entirely, and a lot more advanced.
But you can say "all power to the forward shields!", and really, that would make it all worthwhile.