While the federal government's program to force increased heating oil production apparently has succeeded in ensuring an adequate supply this winter, it appears to have caused two important side effects: sharply increased prices and a looming prospect of gasoline lines next spring.

In ordering the oil industry to have 240 million barrels of home heating oil in its tanks by the end of next month at all costs, the Carter administration also:

Allowed the oil industry to boost heating oil prices more than 50 percent since January, including an equal boost in refiner margins [which includes profits] during that time.

Forced the industry to stockpile so much heating oil as insurance against shortages that it may have to cut back gasoline production for lack of storage space.

The latest Energy Department figures show that home heating oil and diesel fuel in refiner storage tanks reached levels slightly above what they were at the same time last year.

And if refinery production continues at its present level, it appears the industry could have as much as 255 million barrels in storage by President Carter's deadline.

But the price for that abundant supply has been high. Heating oil prices have gone from about 50 cents a gallon last fall to about 87 cents a gallon today, a jump of around 75 percent.

And there are indications now, according to DOE officials, that a large portion of that increase came in the form of industry profit boosts.

At a time when prices and profits would under normal circumstances drop because demand for heating oil was dropping, just the opposite has happened.

Because the administration wanted to be extra sure that there would be no winter shortage, it essentially created an artificial demand for heating oil that would not normally have been justified.

And the industry, which has long felt its profits on heating oil to be inadequate, used the situation to increase profits, boosting the price of heating oil far more than was justified by import crude oil price increases.

While some of the added increase is clearly due to increased operating costs to refiners, even oil company officials admit they have begun to raise profits to what they consider to be more equitable levels than they have had in the past.

"There is without question an element of increased profits. Our profits on heating oil have definitely improved, says Charles Bowman, vice president of Gulf Oil Refining and Marketing Co. But, he added, the boosts represent "the first real increase in profit margins in this industry since 1973 when heating oil was first put under price controls."

Those controls were removed in 1976, but a soft market for heating oil, which is being used in fewer and fewer homes each year, has prevented the industry from increasing profit margins.

Administration economists anticipated, for example, that normal petroleum consumption during the fourth quarter of 1979 would be 6 percent above a year ago and 9 percent above 1977, based on another overly optimistic estimate that the gross national product would jump 3.5 percent in 1979. Instead, it now appears, demand is dropping as a recession takes hold.

And, the DOE forecasters paid little attention to the impact that mandatory heating standards and switching to natural gas or other fuels would have in reducing overall consumption. Those factors, it now appears, will result in significant reductions in consumption.

And, finally, the DOE forecasters made no adjustment to their consumption projections to account for the impact higher heating oil prices would have on its use by residential, commercial and industrial users.

"We always thought the 240-million-barrel level was too high," says Ted Eck, chief economist for Standard Oil of Indiana. "I thought 210 or 220 million barrels had more logic. We thought there would be a recession, and that higher heating oil prices would repress demand. I haven't met anyone who uses heating oil who isn't doing something like wearing a sweater or just turning down the dial to reduce the amount of heating oil used."

Gulf's Bowman said he, too, viewed the government figures as being "on the high side. And our view has not changed. But our main concern was the timing of when they wanted peak inventory levels."

Bowman said Gulf usually considers Dec. 1 the time to have peak stocks in order to insure adequate coverage during the winter.Carter originally set Oct. 1 as his target, but later moved that to the end of October.

Departing Deputy Energy Secretary John O'Leary now defends the 240-million-barrel figure by saying "we had no choice." He said the administration was so concerned with insuring supplies for the winter that it had built in an additional 20 million "fudge factor" into the 240-million-barrel figure, in case the winter was an extremely bad one.

But, Bowman says, "O'Leary never talked to us about any 20-million-barrel pad."

The problem with the government projections may be that they were motivated more by political considerations than economic ones, administration sources say.

Participants in the interagency task force on energy set up by Carter say that during that group's meetings, the question of Carter trooping through the snows of New Hampshire during a heating oil shortage was raised several times. That risk, they were told, had to be avoided at all costs.

At the same time, administration insiders report, little consideration was being given to the meaning of the statement "all costs."

Besides creating a fear of shortages that did help to push prices up, the administration warning to refiners to produce huge amounts of heating oil, and fast, sent scares through consumers, particularly in the Northeast. That situation resulted in a willingness on the part of consumers and retailers to pay abnormally high prices to be insured of a supply that may never have been in doubt.

And now there is a new dangerous side effect looming on the horizon: gasoline shortages next spring.

"We are worried about having too much heating oil in primary storage," said Standar's Eck. "We run the risk of producing so much more heating oil than we need that our storage tanks will be full when we have to start producing enough gasoline. If our tanks are full, we have to shut down refinery capacity and only refine the amount of product we can ship every day. We can't drink the stuff."

"When you have too much heating oil, which it appears we may, one of two things can happen," says Gulf's Bowman. "Either you broker it to someone else -- which will be unlikely this winter since everyone will probably be in the same situation -- or you reduce refinery runs. And that means less gasoline. If we have to curb refinery runs because we can't store the oil, we have to cut back gasoline production.

"What we are doing," he said, "is inviting gasoline lines next summer."

Still, there are others who are happy to see so much heating oil around.

"I thought the 240 was a proper target when I heard about it, and I hope they keep at it and even pass it," says John Buckley, president of Northeast Petroleum outside of Boston, one of the largest resellers and wholesalers of heating oil in the country.

Buckley said his firm is moving out stocks to retail dealers faster than last year because "we don't have enough storage to contain what we're getting."

But, he says, "extra protection [through increased refining] is the prudent thing to do. If it causes containment problems to refiners, that's too bad."

He admits there is a risk of a tougher gasoline situation in the spring, but said that was acceptable because "we don't want to play roulette with a problem as important as keeping warm."