WASHINGTON (AP) _ President Reagan said today he supports a 50 percent pay raise for members of Congress and other federal officials because ''we must not allow federal service to become the province only of the wealthy.''

In a letter to the House and Senate, Reagan said he endorsed the pay-raise recommendations of the Commission on Executive, Legislative and Judicial Salaries. He said ''fair compensation for those who bear the responsibility for effective functioning of our government is critical at this juncture of history.''

In advance of the president's decision, which was made public late Thursday by the White House, consumer activist Ralph Nader labeled it the ''greatest salary grab in government history.''

The raise will increase the pay for members of Congress and federal judges to $135,000 a year unless both houses of Congress reject it by Feb. 8.

In his letter today, the president coupled his support for the pay hike with a plea that Congress at the same time bar outside income such as speaking fees, as the commission recommended last month.

''The current system undermines public faith in the integrity of senior federal officials, particularly in the legislative branch,'' Reagan wrote. ''Congress should move immediately to enact legislation that takes a comprehensive approach to the problems posed by honoraria, including payments for articles, speeches and appearances, and other forms of financial benefits.''

President-elect Bush, asked today about the pay raise, said he supports whatever Reagan decides, but may take another look at the issue when he becomes president.

Asked by reporters if the nation could afford the big pay increase at a time when it is grappling with huge budget deficits, Bush said: ''Well, I don't know whether we can afford anything other than to get this deficit under control. ... I am vice president and I will be supportive of what the president decides. I've done that for seven and eleven-twelfths years and I don't plan to change now. So let's see what the president says and then when the ball is in my court and the buck is stopping on my desk, I may have something else to say about matters of this nature,'' Bush said.

He spoke after the White House released Reagan's letter supporting the pay increase.

Rep. Vic Fazio, D-Calif., said, ''I'm very pleased that the president has decided to make this decision. This is a pay raise for all the top-level federal officials ... but, of course, we (Congress) take all the heat.''

Nader said, however, ''Mr. Reagan has put an end to any further pretense that he wants his federal deficit reduced. He has thumbed his nose at the vast majority of the American people, Republican, independent and Democrat alike who are against the greatest salary grab in government history.''

Reagan could have modified the proposal made last month by the commission. Under the law, unless both the House and Senate vote to head off the pay increases, they will automatically take effect 30 days after the plan is submitted to Congress with the proposed federal budget on Monday.

The commission recommended that members of Congress and federal district judges, who now make $89,500 a year, be paid $135,000. The House speaker's salary would go from $115,000 to $175,000, and that of majority and minority leaders from $99,500 to $155,000.

Top executive-branch officials such as Cabinet members would get raises from their current $99,500 to $155,000.

The commission also recommended that Congress raise the president's pay to about $350,000 from the current $200,000, where it has stood since 1969. However, such a hike would not take effect until 1993 because of a constitutional prohibition on raising a president's pay during his term.

Fazio said he believes the Senate is likely to reject the raise, as it has in past years when the House allowed pay hikes to take effect. The lawmaker said he believed a ban on honoraria would be enacted if the raises were accepted. He said that would keep the overall benefit to lawmakers less than that for judges.

On Thursday, the nonpartisan National Taxpayers Union delivered petitions to the White House bearing the names of 13,000 people who oppose the raise.

Spokesman David Keating said after the White House announcement, ''I think Reagan's action is outrageous. Adopting fat pay raises for top officials will sabotage President-elect Bush's flexible spending freeze proposal ... Raising congressional pay by 50 percent is about as popular as trading arms with the ayatollah.''

A White House statement said that since 1969, ''salary levels for senior federal officials - executives, legislators and judges - have declined 35 percent in constant dollars while the compensation of workers in the private sector has kept pace with inflation.''

''Federal trial judges are currently earning less than some junior lawyers in private practice and are leaving the bench in record numbers,'' it said.

In addition, deputy White House Press Secretary Leslye Arsht said the National Institutes of Health had trouble attracting qualified scientists for senior positions in critical areas such as cancer research, and the average length of service in the executive branch had fallen to 18 months.

Lloyd Cutler, chairman of the salary commission, said last month he expected strong pressure to abolish honoraria and other forms of outside pay.

The public interest group Common Cause has reported that lawmakers accepted a record $9.8 million in speaking fees from special interest groups in 1987.

The pay recommendations directly affect about 2,500 top federal employees and indirectly affect 10,000 other high-level employees whose pay is tied to salaries in the top echelon.