A key senator is preparing legislation to curb dramatically the powers of the Federal Trade Commission to challenge unfair advertisements and to regulate the actions of professional trade groups, such as the American Medical Association.

Agency and congressional sources say Sen. Robert Kasten (R-Wis.), chairman of the Commerce consumer subcommittee, is on the verge of introducing legislation that in some respects places far tougher restrictions on the agency than those recommended by its chairman, James C. Miller III, at recent congressional hearings.

Although the legislation would bar the agency from regulating unfair advertising, the FTC still could go after false and deceptive advertising. Curbing its power in this area is one of Miller's priorities.

The legislation would curtail sharply the agency's ability to issue trade regulations or file lawsuits against any "learned profession," a lobbying victory for doctors, dentists, lawyers and other professional groups.

Miller vigorously has opposed any such restrictions arguing that the professionals' curbs on advertising are anticompetitive and inflationary.But the legislation as written would forbid the FTC from challenging limits on advertising or other professional restrictions if the limits are based on a state law or regulation.

In a concession to the advertising industry, the legislation also bars the FTC from attacking advertisements it considers unfair. Even though Miller and his three fellow commissioners have told Congress that some limits could be placed on the agency's authority over unfair ads, the commission has unanimously opposed a complete repeal of its authority in this area.

However, as currently written, the legislation would still permit the agency to challenge commercials if they are deceptive. Miller has urged strongly for the past two months that Congress limit the commission's authority in this area.

Sources indicate that Miller's staff is still trying to persuade Kasten to include in his legislation at least some limits on the agency's ability to go after deceptive ads.

As a result, they say, that provision "is still very fluid" and could change when the legislation is introduced.

The professional provision could also change, sources say. As currently drafted, it does not exempt completely doctors, accountants and other professions from FTC regulation.