Imposing a $5-a-barrel fee on oil imports would add more to the profits of domestic oil producers than it would yield to the Treasury and would be dangerously inflationary, House Energy and Commerce Committee Chairman John Dingell (D-Mich.) said Tuesday.

Dingell wrote to House Speaker Thomas P. (Tip) O'Neill (D-Mass.), urging him to reject attempts to impose an oil import fee to reduce the size of the federal deficit. A $5-a-barrel fee would generate $7 billion in federal revenues from oil imports while producing $20 billion in additional revenues for domestic producers, assuming they raised prices to match the new prices of imported oil with the fee, he said.

Citing a study by his committee's staff, Dingell said that the Treasury would gain only $3 billion in additional revenue from domestic producers, although they would also face greater state taxes.

Reagan administration aides have been pushing for an oil import fee in recent discussions with leaders in Congress.

"I can see no economic justification for any action that adds to the cost of petroleum products at this time, but the imposition of a selective fee on imported petroleum would be dangerously inflationary, outrageously unfair to American consumers and would pour billions of dollars of new profits into the already swollen coffers of domestic producers," Dingell wrote. "It must be forcefully and finally rejected."

Generally the proposal appears to have a better chance of being accepted by the Senate, where Finance Committee Chairman Robert Dole (R-Kan.) and Budget Committee Chairman Pete V. Domenici (R-N.M.) have indicated support.

Dingell said that domestic oil producers would add a charge equal to the amount of the import fee to domestically produced oil that "would result, for the most part, in further unearned and disproportionate windfall profits for domestic producers."

He quoted figures developed by the committee staff that he said indicate such a fee would add more than 1 percent to the inflation rate and as much as 12 cents a gallon to the price of gasoline and heating oil. The fee could increase consumer costs by as much as $30 billion annually, he said, warning that business failures might follow.

Dingell proposed instead that, if a tax on energy were to be sought--which he opposes--a more equitable solution would be an across-the-board levy on all products.