Evolution of the frequency spectrum of a relativistically strong laser pulse in a plasma