A federal regulator of US oil contract traders has announced steps to restrain the excessive speculation that many experts believe are driving up gasoline prices.   The Commodities Futures Trading Commission (CFTC), a previously obscure regulatory agency now in the global spotlight, announced the change in oil-trading regulations yesterday.    The measures announced will require buyers of US oil contracts on the London-based Intercontinental Exchange (ICE) to abide by US regulations for the first time.