The United States has not changed its position that a political settlement for Namibia, which is still ruled by South Africa despite western diplomatic efforts to bring it to independence, must be linked to the withdrawal of Cuban troops from neighboring Angola, administration officials said yesterday.

The officials were responding to remarks by Prime Minister Robert Mugabe of Zimbabwe, who is winding up his first official visit here. He talked Tuesday with President Reagan and had meetings yesterday at the State Department and with members of the House Foreign Affairs Committee.

Mugabe said that he was "surprised" that Reagan had linked a Namibian settlement to the withdrawal of an estimated 25,000 Cuban troops from Angola. But he also said that the United States appears to have changed its position.

"When I came, I had concluded that the United States had allowed this matter, as it were, to die off," Mugabe said. "But it appears it's still alive, and South Africa, as President Reagan says, is insisting that that condition be fulfilled before everything else is undertaken.

"But," he added, "there was a modification which appears new, that perhaps a firm commitment by Angola on the question might suffice rather than the actual withdrawal."

U.S. officials insisted, however, that U.S. policy has not changed. The American position on Namibia, they said, remains that there must be "parallel movement" involving South African withdrawal from the territory and Cuban withdrawal from Angola. "If a commitment from the Angolans were acceptable to both sides," one official said, "who are we to say no? This does not represent a change in our position."

A South African official said his country would agree to go forward with a Namibian settlement "if there is a firm agreement with Angola and if there is reason to believe it will be carried out."

Mugabe said that black African nations feel that Angola needs Cuban help to defend itself from the white-minority regime in Pretoria.

Meeting with members of Congress earlier yesterday, Mugabe defended his country's abstention from Monday's U.N. Security Council vote on whether to condemn the Soviet Union for shooting down a South Korean airliner.

Mugabe said Zimbabwe had been "dismayed" at the U.S. veto of a resolution condemning a "clear issue of South African invasion of Angola."