The Reagan administration, seeking a foreign policy victory to demonstrate the validity of its tough line on communism, has mounted a new, high-level attempt to win independence for Namibia and force the withdrawal of Cuban troops from Angola.

That, senior U.S. officials said privately, was the principal reason for Secretary of State George P. Shultz's meetings in New York Thursday with the foreign ministers of eight black African countries and Sam Nujoma, leader of guerrillas battling South Africa's 63-year control of the predominantly black territory also known as South-West Africa.

According to the officials, Shultz wanted to signal to the black Africans his determination to play a more active role in breaking the deadlock over Namibia. He also sought, they said, to counter growing charges by the Africans and U.S. civil rights groups that administration policy tilts toward South Africa's government, which is run by its white minority.

But while couched in polite, indirect language, Shultz's message did not vary from the line to which the administration has clung tenaciously: that South Africa cannot be induced to surrender Namibia until Marxist Angola agrees to send home sizable Cuban forces.

The black Africans, backed by U.S. liberals, reject this "linkage." Now, however, administration policy makers, encouraged by what they regard as hints of flexibility from Angola and the black African states, hope that they might finally be on the way to a double-barreled diplomatic coup in southern Africa.

That would be very important to President Reagan because it would represent a clear-cut foreign policy success. As more highly publicized initiatives, particularly in Central America, fail to produce results, administration sentiment has increased for a new southern Africa push.

Although that area was singled out by Reagan at the outset of his term as a high priority, it was put on the back burner.

In fact, the officials noted, the White House would particularly welcome success there because of its innate compatibility with Reagan's ideological world view.

An agreement to withdraw Cubans from Angola would buttress Reagan's claim that toughness and resolve are the way to check the spread of communist influence. And, an equitable agreement on Namibian independence after years of frustration would allow the administration to argue that its approach also serves Third World interests and aspirations.

Pursuit of this approach has caused considerable strain in the so-called "Western Contact Group," the United States, Britain, France, West Germany and Canada, that has been playing an "honest broker" role for almost a decade in Namibia negotiations.

France and, to a lesser extent, Canada have strong reservations about linking Namibia to Angola. And the British and Germans, while more neutral, have made clear that the linkage is exclusively a U.S. idea. As a result, although the contact group still officially exists, the other members have basically ceded to the United States all responsibility for seeking a solution tied to the Cuban presence in Angola.

Despite increasing U.S. isolation on the issue, U.S. officials say that they see hopeful signs of headway. The United Nations is holding a special debate on Namibia, which is the reason the African leaders were in New York. And U.S. officials noted that rhetorical criticism of the United States has been relatively restrained at the U.N.

The officials also believe that most of the problems associated with Namibian independence, including provisions for elections and U.N. supervision after a South African withdrawal, are close to resolution and that only a parallel accord on Cubans in Angola stands in the way of South Africa's agreement to stand aside.

Angolan Interior Minister Manuel Alexandre Rodrigues, regarded as the second most powerful person in the government, discussed the situation with Shultz here recently. Immediately afterward, President Jose Eduardo dos Santos went to Moscow for talks that U.S. officials say they believe centered on reaching an accommodation about the Cubans.

These officials said that they still do not know what may have been decided in Moscow, but they anticipate another U.S.-Angolan meeting soon and a clearer picture of whether the Luanda regime is ready to show more flexibility.

"Our most recent discussions with the Angolans have been very good," a senior U.S. official said. "The fact that they sent someone of Rodrigues' standing to Washington was a clear signal that they are at least tentatively interested in dealing.

"Still," he said, "while we're more optimistic, the situation is far from clear. It could happen tomorrow; it could be three months from now, and it could be a year from now.

"But we're still convinced that the bottom line involves Angola: If there isn't some kind of agreement for an eventual Cuban withdrawal, the Namibia thing simply isn't do-able because the South Africans won't let go as long as they have to worry about a sizable communist military presence in the neighborhood."