HELP! Headlights flash

when ever i drive on the motorway and go fast the lights start flickering and the electrics cut out for a second then come back on leaving me with warnings lights on the dash and it also happens when giving it a boot round some near by lanes but when i drive normal the car is fine it only happens every now and then when the pedal is to the metal and i go fast i get headlights flashing and dash lights flash could this be my alternator??