WASHINGTON (AP) _ A federal judge today cleared the way for AT&T Corp. to acquire McCaw Cellular Communications for $12.6 billion - with some strings attached.

U.S. District Judge Harold Greene granted a waiver of a consent decree so that AT&T can acquire cellular telephone properties in Houston and Los Angeles, which McCaw co-owns with regional Bell telephone companies.

''The court concludes that the waiver is suitably tailored,'' Greene wrote in a 26-page opinion.

In granting approval, Greene imposed a number of conditions on AT&T and McCaw designed to protect competition.

Importantly, the order says that if a proposed antitrust settlement between AT&T and the Department of Justice is not approved by the court, then AT&T must divest its interests in the cellular systems co-owned with the Bell companies.

The order also says neither AT&T nor its affiliates can unfairly channel McCaw's 32 million cellular customers toward AT&T for their long-distance calls, harming competing long-distance companies.

And, given that AT&T is a major supplier of cellular equipment, the order bars the company from being the ''beneficiary of any discrimination'' involving the procurement of telecommunications equipment and technical services from its cellular systems.

Earlier this year Greene had ruled that AT&T needed a waiver of the decree that broke up the Bell System in 1984 in order for the deal to be approved in its current form.

Without a waiver, Greene said, AT&T would be in violation of the consent decree. The decree bars AT&T from owning Bell company assets. If it acquired the Houston and Los Angeles properties, it would be partners with Bell companies.

Greene's action is the last major regulatory hurdle for the deal. Last month, the Justice Department cleared the way as long as AT&T agreed to abide by conditions aimed at fostering competition.

Still, at least one other court challenge has been made to the deal. Bell Atlantic Corp. and Nynex want to block the deal, saying it will hurt competition, even if the Justice Department settlement were approved. That case is pending in federal court in New York.

BellSouth Corp. challenged the waiver request in the District Court here. The regional phone company wanted Greene to impose conditions on AT&T and McCaw to ensure that other cellular competitors are not unfairly disadvantaged by the combination. Or, BellSouth wanted Greene to give its company and other similar relief the consent decree. Greene did not do so.

BellSouth officials and AT&T officials were not available for comment.