John F. O'Leary, President Carter's nominee for federal energy administrator, said yesterday one of his first priorities, if confirmed, would be to develop "credible data" on the nation's energy reserves.

O'Leary, testifying before the Senate Interior Committee, acknowledged a widespread public skepticism about the government's industry-supplied data on oil and natural gas reserves.

He advocated setting up an independent data-gathering service - such as the Bureau of Labor Statistics, which compiles information for the Labor Department. Also, he said, the federal government should perform a limited amount of exploratory drilling to assess reserves.

O'Leary's comments coem at a time when major oil comapanies have been accused of "shutting in" - closing - oil wells after discovery while waiting for higher prices. O'Leary discounted the extent of shut-ins, but said the Federal Energy Administration must gather independent data to allay public suspicions.

Committee Chairman Henry M. Jackson (D-Wash.) told O'Leary, who is now New Mexico's energy administrator, that the FEA "is not a popular agency."

Despite its 3,000 employees, "the FEA has a woeful record of inadequate regulatory oversight (of) the oil industry," Jackson said. "Not a single audit of a major oil company has ever been completed by FEA."

O'Leary, who is expected to be confirmed without controversy, has more than 20 years of federal government experience. An economist, he has served as director of the Interior Department's Bureau of Mines, the Federal Power Commission's Bureau of Natural Gas and the Atomic Energy Commission's licensing staff.

Jackson said O'Leary has agreed to divest himself of $153,600 in income from three energy companies, El Paso Natural Gas, Union Pacific and Resources Sciences Corp. O'Leary is due the money in increments over the next 16 years for services performed while he was a private consultant between 1970 and 1974.

The details of the divestitute have not yet been resolved, Jackson said.

Sen . John Melcher (D-Moint.) suggested to O'Leary that the financial arrangements "puts you in difficult position" because of a proposal by Standard Oil of Ohio to transport Alaksan oil from Los Angeles to Midland, Tex., in a pipeline owned by El Paso Natural Gas.

O'Leary denied after the hearing that his financial arrangements constitutes a conflict of interest. "It's a zero conflict as far as I am concerned," he said.

Melcher and other Northern senators prefer to have the oil transported to the Midwest in pipelines across Canada and Northern U.S. states.

Unlike his predecessor, Frank G. Zarb. O'Leary refused to rule out the possibility of exporting Alaskan oil to Japan in an exchange agreement. The swap arrangement, expressly forbidden by law, would be a solution on the West Coast next summer, oil companies say.

"I think you could conceive of a set of circumstances where you could make a swap without diminishing the best interests of the country," O'Leary said, but added that it would be "a difficult prima facie case."

O'Leary was criticized by two environmental groups, the Sierra Club and the Western Coalition, for his advocacy of government-supported synthetic fuel development.