All self-assembled nanostructures, like carbon nanotubes, exhibit structural imperfections that affect their electronic and mechanical properties and constitute a serious problem for the development of novel electronic nanodevices. Very common defects in nanotubes are pentagon-heptagon pairs, in which the replacement of four hexagons by two pentagons and two heptagons disrupts the perfect hexagonal lattice. In this work, we demonstrate that these defects can be eliminated efficiently with the help of femtosecond laser pulses. By performing nonadiabatic molecular dynamics simulations, we show that in the laser-induced electronic nonequilibrium the pentagon-heptagon pair is transformed back into four hexagons without producing any irreversible damage to the rest of the nanotube.