President Carter recommended yesterday that senior officials of the executive branch and members of Congress receive an immediate 16.8 percent pay raise, a proposal that if approved by Congress would affect almost 35,000 top government employes and cost $183.1 million during the current fiscal year.

Administration officials said that Carter, in the budget he will submit to Congress next week, will also propose that all government employes receive a 5.5 percent pay raise for the fiscal year that begins Oct. 1.

Pay of senior federal officials has been frozen for four years.

The pay levels recommended by the president are substantially less than those that were proposed to him last month by the nine-member advisory Commission on Executive, Legislative and Judicial Salaries, which urged pay raises for top government employes ranging up to 40 percent. Nonetheless, Carter's proposals, which must be approved by Congress to take effect, amount to a sizable parting gift to senior officials of the incoming Reagan administration and members of Congress.

Under the proposal, for example, the salaries of Cabinet officials would increase from $69,630 a year to $81,328. The salaries of members of the House and Senate would increase from $60,662 to $70,853.

The proposals would affect 800 executive level employes -- the top officials of the executive branch -- and another 33,500 executive branch officials, including members of the senior executive service and GS14s and 15s, at a cost of $164.4 million this fiscal year. They would also affect the salaries of the 535 members of Congress and a handful of top appointed officials of the legislative branch at a cost of $18.7 million this fiscal year.

The president's pay raise proposals, which were submitted to Congress yesterday, did not include anything for federal judges. This was because the Supreme Court, in a unanimous decision last month, granted itself and other federal judges the 16.8 percent pay raise that Carter urged now also be granted to top officials of the other two branches of the government.

The 16.8 percent figure and the court decision both grew out of the same action -- the pay cap imposed on the salaries of senior federal officials by Congress. This cap froze the salaries of officials who were paid $50,112 or more.

While the cap has remained in place, however, other federal employes have received annual cost of living pay raises that totaled 16.8 percent of their salaries during the last two fiscal years. Lower court federal judges challenged the constitutionally of the cap as it applied to the federal judiciary, leading to last month's Supreme Court Decision.

In his message to Congress, the president noted that while the salaries of top federal officials have risen by 5.5 percent since 1977, the consumer price index has risen by about 45 percent during the same time and salaries for executives outside of government by about 25 percent.

To prevent this from happening in the future, Carter urged a permanent lifting of the pay cap so that the top officials of a the government would receive cost of living pay raises at the start of a fiscal year as other federal employes have received.

Officials said that in the budget he will submit to Congress next week Carter will include funds to grant a 5.5 percent cost of living pay raise to all federal employes beginning Oct. 1. The final decision on how large a general pay raise to propose, however, will not rest with him but with President-elect Ronald Reagan, who will have authority to alter the Carter budget recommendations for the next fiscal year.