The Carter administration, responding to an AFL-CIO legal challenge to its anti-inflation program, argued yesterday that its wage and price guidelines are purely voluntary even though violators are to be denied federal contracts of more than $5 million.

The AFL-CIO and nine individual unions, including the striking United Rubber Workers, have characterized the contract denial penalty as amounting to "mandatory controls" in a suit seeking to bar the government from using it as a threat to hold down the cost of labor contracts.

U.S. District Judge Barrington Parker denied a request for a temporary restraining order against the government last week but has scheduled a hearing Wednesday on the substance of the case.

The case has become a key element in the strike against Uniroyal Inc. by the URW, which contends that the government contributed to a bargaining impasse by threatening the company with contract debarment if it didn't abide by its 7 percent guideline for annual wage and benefit increases.

In papers filed yesterday by the justice Department, the administration did not dispute the AFL-CIO's contention that mandatory controls have not been sanctioned by Congress. But is said the program is voluntary - far different from the mandatory wage-price controls of the early 1970s - and "securely grounded in ample statutory authority."

Asserting that federal contracts "may or may not be an important consideration for an individual company," the administration said: "In any event, no company has a legal right to a government contract, and none can be heard to complain if it voluntarily takes acions which the company, on balance, believes to be advantageous, but which renders it ineligible for certain government contracts." The government, is said, is simply acting as a "prudent purchaser."