Trying to preserve Republican control of the Senate with a final campaign swing through the West, President Reagan charged today that his Democratic opponents were preparing a last-minute advertising campaign of distortion and demagoguery on the Social Security issue.

" . . . I can predict that our opponents are going to broadcast widely one of the most dishonest canards that has ever been featured in a political campaign," Reagan said in remarks to a GOP rally here.

"They are going to tell you that we -- and I really include myself because I'm kind of a target of that -- are . . . on our way to changing or reducing or doing away with Social Security. And let me tell you that is what I said before, sheer demagoguery and a falsehood."

The comment, a reiteration of what the president said at a stop earlier in Casper, Wyo., was not part of Reagan's prepared text. White House spokesman Larry Speakes said en route here from Casper that the issue had been raised deliberately by the president.

"He felt strongly about the issue," Speakes said. "We feel the Democrats are waging a campaign of distortion. The whole Democratic campaign effort in the final days will be based on a campaign of fear and the president felt compelled to set the record straight."

Later, in Las Vegas, White House chief of staff James A. Baker III explained the tactical reason for raising the issue this way: "We can't just let it sit there for the last four days" of the campaign.

United Press International reported that Democratic National Chairman Charles T. Manatt, in a speech in Albuquerque, said voters have a "clear and clean chance" to send the president a message on Tuesday "that we don't want the administration gutting Social Security by making it voluntary or tampering with vital benefits."

Manatt charged that the Republicans want to keep Social Security cuts "under cover" until after the elections, UPI reported.

The Social Security issue has been raised frequently in the Wyoming television commercials of Rodger McDaniel, 34, the Democratic challenger to Republican Sen. Malcolm Wallop.

McDaniel has consistently pictured Wallop as a foe of Social Security. Wallop says this is a distortion of his position.

Last week, Republican polls showed McDaniel closing to within 7 points of Wallop, once presumed to be a shoo-in for reelection.

Wyoming's lone House member, Republican Richard B. Cheney, who even Democrats agree has no problem being reelected, said today that at one point Wallop's lead was even less than 7 points but that the race has now stabilized and that a recent tracking shows Wallop 19 points ahead.

"McDaniel gave it his best shot and he damn near caught him, but not quite," Cheney said. "I think Malcolm's going to win with 55 percent of the vote."

The volatility of Wallop's lead points to the main reason Reagan spent today campaigning for Senate candidates in the sparsely populated inter-mountain west.

After a recent visit to Nevada, where the president campaigned again today, GOP nominee Chic Hecht gained eight percentage points in survey trackings. Based on anticipated voter turnout next Tuesday, 10 percent of the vote would amount to only 15,000 votes in Wyoming, about 18,000 in Nevada and less than 30,000 in Montana -- the three states Reagan visited today.

On this western swing, which will conclude Friday with visits to Utah and New Mexico, Reagan is stressing the anti-Washington themes that launched his original presidential candidacy in 1968.

At Casper, he said, "You all live in a world that Washington will never quite understand -- the real world."

And in the rally here at Great Falls in behalf of Republican Senate candidate Larry Williams, Reagan denounced the "bafflegabbers and fancy dudes in Washington."

Speakes defined bafflegabbers as "people who talk in circles."

The president blended his condemnations of Washington with an attack on the "failed policies of the past" and a characteristically optimistic appraisal of the positive results he believes will result from his economic programs.

"The truth is, thanks to your courage, your patience and your support, we've already accomplished a minor miracle: we've pulled America back from the edge of disaster," Reagan said.

In his remarks at the Las Vegas Convention Center, Reagan predicted that "the people of Nevada, just like honest, hard-working people in the rest of the country, are going to give a message to the quitters and the Washington gloom and doomers. And that message is going to be: stay the course."

Reagan did not refer to Social Security in his Las Vegas speech.

The crowds attending the rallies were enthusiastic, but the audiences in Casper and Great Falls were dominated by young people who had been let out of school for the occasion.

Though Reagan appeared generally to be in good campaign form, he twice forgot the name of Wyoming House Speaker Warren A. Morton, the Republican nominee for governor against Democratic incumbent Ed Herschler. Democrats say they are confident that a lot of voters will also forget Morton on election day and say that Herschler is now comfortably ahead.

Speakes said that Reagan's raising the Social Security issue was designed to head off the expected Democratic advertising campaign and was not triggered by an article in The Washington Post today that related how House Republicans have sent out a fund-raising letter and questionnaire that lists making Social Security voluntary as one option for putting the system back on a sound financial footing.

Speakes said the White House first learned of the GOP letter from a wire service report today. Meanwhile, the National Republican Congressional Committee said today that the letter was being scrapped. Details on Page A18.