WASHINGTON (AP) _ The Reagan administration said Wednesday it would have to be convinced of the legitimacy of any political reforms proclaimed by Nicaragua before cutting off aid to rebels seeking to topple the leftist Managua government.

''We wouldn't buy a pig in a poke,'' deputy White House press secretary Larry Speakes said, underscoring President Reagan's commitment to seek $100 million for the anti-government guerrillas, known as Contras.

The House is scheduled to vote June 9 on Reagan's aid request for the rebels, and there has been speculation that Nicaraguan President Daniel Ortega might sign an agreement before the vote promising reforms.

Supporters of Reagan's aid package fear that such an agreement would further undercut chances for approval of assistance for the rebels.

Speakes said the administration seeks a political solution in Central America that includes goals outlined by the Contadora group, such as free elections, internal reconciliation and reduction of Nicaragua's armed forces to a level equal to that of her neighbors.

Beyond that, Speakes said, the administration insists Nicaragua cut off military ties with Cuba and the Soviet Union.

''If such a comprehensive treaty is signed, we believe that the democratic opposition would then have an opportunity to participate in the political process in Nicaragua,'' he said.

''With the opportunity to participate in this political process, a fair and open political process, there would then be reassessment of the need for armed opposition,'' Speakes added. ''Meanwhile, we will continue our efforts to support the Contras.''

Speakes emphasized, ''We'd be sure of what we had before we moved to withdraw our support for the Contras. I think the Contras themselves would be satisfied if they had all these objectives met.''

Underscoring that the administration still wants Congress to approve the aid, Speakes said: ''I don't think these fellas down there (in Nicaragua) are going to have this done by June 9. I don't think we'll have free elections by June 9 or free labor unions or freedom of religion or all of that.

''We hope it can be done, but I just don't believe it's going to be done.''