Power poetry took over from power politics for a change of pace at the White House last night. And even after the party was over and Australian Prime Minister Malcolm Fraser went off to bed at Blair House, President Reagan continued to wax poetic.

It was a night of Robert W. Service, that bard of the Yukon who was President Reagan's favorite boyhood poet, and for a half-hour or so Dan McGrew, Sam McGee and sagas of a knockabout life kept American and Australian officials spellbound in the glittering and historic East Room after Reagan's official dinner for Fraser.

The president later said he used to recite "The Shooting of Dan McGrew" when he was 8 years old, though he had never before heard "Lenin's Tomb," which Service wrote after a 1939 visit to Moscow.

When actor-director Vincent Dowling recited "doctors plug him full of dope, for if he drops to dust, so will collapse their faith and hope and the whole damn thing will bust," Secretary of State Alexander M. Haig, seated in the front row, burst into laughter.

It was also a night of getting acquainted and reaffirming U.S.-Australian ties. Over coffee in the Green Room, Fraser said he and the presdient "certainly perceive the same kinds of [political] philosophy, the same kinds of ideas. I had suspected that we would hit it off because I had been watching the policies the president had been advocating so long."

Fraser, who narrowly won a third term last November, alluded to some of his more recent political problems back home (one cabinet officer resigned, calling him "erratic, overbearing and disloyal") when in his toast he told of receiving a fishing rod from President Reagan.

"I'm not sure if he is encouraging me to wade in deep waters, but I'm sure if I do I'll be making a deep catch. If I catch the fish with this particular rod I'll always be wondering who it is on the end of it. "that," said Fraser, "has particular relevance to certain people in Australia."

Fraser went over big with Interior Secretary James G. Watt, who thought the prime minister sounded "like the Republican national chairman -- that's the spirit we need all over the world."

And Watt claimed to be unconcened about reports of a recall movement by environmentalists opposed to his controversial policies in the West.

"Oh, heavens, no. If I were endorsed by the Sierra Club, this president would run me out of here so fast my head would spin. That's why 'm here, so I draw their wrath. We have received no criticism from anybody who voted for Ronald Reagan."

Exuding confidence, Watt said, "I'm loving it. I was brought here to fight and bring about change. That's what we're doing. This guy," nodding towards to president, "is great."

Lyn Nofziger, the president's political adviser, called it "nonsense" that Watt is ruining Republicans' chances for 1982 in the West with his policies on off-shore oil drilling.

"I don't get any complaints out of the West. I had one of my guns in a Denver political meeting yesterday and not one word came back against him."

Results from the Israeli election hadn't yet reached the president, who teasingly turned off questions on the subject by starting to recite some lines from Dan McGrew. Reagan's deputy chief of staff, Michael Deaver, eyes twinkling mischievously, joked that he thought it was terrible that Israeli television was projecting the results even before the West Bank had voted.

On the home front, HUD secretary Samuel R. Pierce said President Reagan's cool reception by the NAACP in Colorado Monday was what he had expected. "I'm sure they would have liked to have the president say he'd like to see the Voting Rights Act extended. The president said the attorney general was working on it and would make a report."

The evening was balmy as the Reagans welcomed their guests at the North Portico. Nancy Reagan wore a red Adolfo patterned with white swirls, one sholder bare and the other hidden beneath a large puffed sleeve. Tall, dark-haired Tamara Franser wore a gown eith dequined bodice and flowing black skirt.

The guest list reflected government, media, sports, politics and personal friendships. Several of the famous Reagan "kitchen cabinet" were among the 100 or so guest who dined on cold salmon and sol mousse, roast contrefilet of beef and frozen lemon souffle with fresh raspberries at tables draped with pale green cloths under lace.

Others included two of Australia's best known "exports," actress-singer Olivia Newton-John and tennis star Evonne Goolagong Cawley. Newton-John was accompanied by dancer Matt Lattanzi, and apparent relaxation of the Reagan White House policy forbidding single guests to bring dates. "I just asked if I could bring him," she said. "I'd be very nervous coming here by myself." Guests for the White House Dinner

The following were guests at President and Mrs. Reagan's dinner last night for Australian Prime Minister Malcolm Fraser. Malcolm Fraser, prime minister of Australia, and Mrs. Fraser Anthony A. Street, member of Parliament, and Mrs. Street, minister of foreign affairs Nicholas Parkinson, ambassador of Australia, and Lady Parkinson Geoffrey Yeend, secretary, department of the prime minister and cabinet P. G. F. Henderson, secretary, department of foreign affairs W. B. Pritchett, secretary, department of defense C. F. Teese, deputy secretary, department of trade and resources Prof. D. A. Kemp, director, prime minister's personal staff Dale Budd, senior administrator, prime minister's staff A. T. Griffith, special adviser, department of the prime minister and cabinet D. F. S. Barnett, press secretary, prime minister's personal staff Richard V. Allen, assistant to the president for national security affairs, and Mrs. Allen Leonore Annenberg, chief of protocol, and Walter Annenberg James A. Baker III, chief of staff and assistant to the president, and Mrs. Baker William J. Barrody Jr., president, American Enterprise Institute, Washington, D.C., and Mrs. Baroody Rep. Tom Bevill (D-Ala.) and Mrs. Bevill Sen. David Boren (D-Okla.) and Mrs. Boren Wallace Brown, correspondent, Courier Mail Chief Justice Warren Burger and Mrs. Burger James V. Carroll III, Andrews, Kurth, Campbell and Jones, Washington, D.C., and Mrs. Carroll Roger Cawley and Evonne Goolagong Cawley William P. Clark, deputy secretary of state, and Mrs. Clark Rupert Clarke, Melbourne, Australia, and Mrs. Clarke Joseph Coors, president, Adolph Coors Co., Golden, Colo., and Mrs. Coors Justin W. Dart, chairman, Dart Industries, Inc., Los Angeles, Calif., and Mrs. Dart Michael K. Deaver, deputy chief of staff and assistant to the president, and Mrs. Deaver Tom DeFrank, Newsweek, and Mrs. DeFrank Vincent Dowling, artistic director, Great Lakes Shakespeare Festival, and Mrs. Dowling Murray J. Gart, editor, The Washington Star, and Mrs. Gart Lt. Gen. Daniel O. Graham, U.S. Army, retired, Arlington, Va., and Mrs. Graham David Graham, winner, U.S. Open Golf Championship, and Mrs. Graham Marshall Green, Washington, D.C., and Mrs. Green Alexander M. Haig Jr., secretary of state, and Mrs. Haig John H. Holdridge, assistant secretary of state for East Asian & Pacific affairs, and Mrs. Holdridge Lou Holtz, football coach, University of Arkansas, and Mrs. Holtz Mrs. Earle M. Jorgensen, Los Angeles, Calif. Thomas Korologos, vice president, Timmons and Co., Inc., Washington, D.C., and Mrs. Korologos Jospeh Lauder, New York City, and Mrs. Lauder Matt Lattanzi Art Linkletter, Los Angeles, Calif., and Mrs. Linkletter Edwin Meese III, counselor to the president, and Mrs. Meese Robert D. Nesen, American ambassador to Australia, and Mrs. Nesen Olivia Newton-John, entertainer, University City, Calif. Franklyn Nofziger, assistant to the president for political affairs, and Mrs. Nofziger Helen Obenshain, Richmond, Va. Richard E. Oldenburg, director, Museum of Modern Art, New York City, and Mrs. Oldenburg Robert L. Pfaltzgraff Jr., president, Institute for Foreign Policy Analysis, Cambridge, Mass., and Mrs. Pfaltzfraff Samuel R. Pierce, secretary of housing and urban development, and Mrs. Pierce. Franklin Pollock, Los Angeles, Calif., and Mrs. Pollock Rep. Ralph Regula (R-Ohio) and Mrs. Regula Louis Rowe, Rockville, Md. Richard Schwelker, secretary of health & human services, and Mrs. Schweiker. William E. Simon, New Vernon, N.J. Holmes Tuttle, Santa Barbara, Calif., and Mrs. Tuttle Temple W. Tutwiler II, Birminghan, Ala., and Mrs. Tutwiler R. Emmett Tyrrell Jr., editor, The American Spectalor, and Mrs. Tyrrell James Watt, secretary of the interior, and Mrs. Watt. Cindy Wick, New York City. Douglas Wick, New York City.