After his victory on the economic program that he had made his administration's first priority, President Reagan and his top aides began yesterday to turn their attention to new legislative goals and upcoming budget problems.

Reagan held a long meeting with Office of Management and Budget Director David A. Stockman to consider the present budget situation and the years through fiscal 1984, the year Reagan has promised the budget will be balanced.

White House counselor Edwin Meese III told reporters that Reagan has told all Cabinet members and heads of government agencies that after six months on the job they should have discovered wasteful or unnecessary programs that can be cut. These potential cuts are to be presented to the White House soon and will be part of the planning process for fiscal 1983, Meese said.

The administration has pledged to cut $29.8 billion from the fiscal 1983 budget that must be submitted to Congress in January. The cuts must be even deeper if, as many economists argue, Reagan's economic forecasts for 1982 prove to be overly optimistic.

An OMB spokesman said final changes in the tax bill had left the revenue loss from tax cuts slightly under the totals the administration projected in its June review. In fiscal 1982, tax cuts will cost the Treasury $37.3 billion. The losses will be $93.7 billion in 1983 and $149.5 billion in 1984.

The basic Social Security retirement benefit, basic unemployment benefits and veterans' benefits will be preserved, but no other program is immune from further cuts, Meese said.

Meese argued that this year's cuts of about $35 billion "were relatively minimal" and that future cuts needed to balance the budget on schedule therefore will not be difficult to identify.

On the legislative front, Meese said Reagan and his advisers will determine in the next two or three weeks their priorities for the period from Labor Day until January.

The most likely issues on which the administration will propose action, Meese said, are crime, narcotics control, transfer of some powers from the federal to state governments, and urban economic development.

In addition, Congress will be presented with the president's choices on how to base the MX missile and what bomber should be built. The administration also will seek approval for its controversial decision to sell the sophisticated AWACS radar planes to Saudi Arabia.

Reagan and Republican congressional leaders had asked that the controversial social issues of abortion, school prayer and busing not be brought up in Congress when they might have drawn attention from the administration's economic program.

Now, it is likely that members of Congress will push for consideration of thse problems, but Meese indicated that the president would not put these among his top priorities.