Nonlinear oscillations and energy localization in carbon nanotubes