After months of aimlessness, the California senatorial race has begun moving in a direction that could help Republicans lock up control of the Senate through the rest of President Reagan's second term.

The latest California poll showed that the 10-way contest in the June 3 primary to pick a Republican opponent for Sen. Alan Cranston is becoming a two-man race. The two top contenders and the only ones making sizable gains since the previous poll are Los Angeles television commentator Bruce Herschensohn, a staunch conservative, and Rep. Ed Zschau, a political moderate and high-tech millionaire from Silicon Valley.

Herschensohn was the choice of only 18 percent of the Republicans sampled and Zschau of only 15 percent, sharing that figure with state Sen. Ed Davis, a former Los Angeles police chief who had led some of the early polls. That is hardly intimidating.

But the others in the field, including Rep. Bobbi Fiedler, Los Angeles County supervisor Mike Antonovich and economist Arthur Laffer, were in single digits. A longtime Republican campaign consultant, neutral in the race, told me, ''The money will move now to Herschensohn and Zschau, and they will pull away.''

With his Los Angeles base and hard-line conservative ideology, Herschensohn would seem to have the edge on Zschau, who comes from the Bay Area and, like many of its Republicans, deviates from some of the Reagan administration foreign policy, defense and social-issue stands.

But Zschau has run a smart campaign. He had to spend money early on ads teaching people how to pronounce his name (it's like the first syllable of shower). With backing from David Packard and other high-tech moguls, he has more in the bank for his closing TV blitz than anyone else in the race.

Although the settings seem very different, this campaign reminds me of the 1978 senatorial battle in Massachusetts. There, a young moderate Democratic congressman named Paul Tsongas came from behind to win the nomination, after TV ads taught voters outside his district how to say his name. In the fall, he went on to upset Sen. Edward W. Brooke, until then the ''unbeatable'' Republican in a Democratic state.

Cranston's position in 1986 is not unlike Brooke's in 1978. He's been around a long time. He has breezed through three consecutive senatorial elections when other Democrats on the ticket were getting clobbered. Cranston has been fortunate in the opposition he has drawn. His opponents have all been right-wingers with limited qualifications to protect California's vital interests in Washington, D.C.

Herschensohn is more articulate than past Cranston challengers, but he's cast from the same ideological mold. Zschau is a different breed of cat. Like Tsongas in his time, the second-term congressman has impressed House colleagues of both parties with his brains and hard work. He could undercut much of the business and independent support that Cranston has enjoyed in the past, and that is exactly how Tsongas beat Ed Brooke.

Brooke was tarnished in that last campaign by some personal scandals. Cranston carries no such burden. But his losing effort for the 1984 Democratic presidential nomination, in which he dyed his fringe of hair orange and went to the left of Walter Mondale on many issues, did not improve Cranston's standing with home-state constituents. There is a feeling here that he may be ripe for an upset.

The California race could be the key to control of the Senate. Republicans may well need to beat one Democratic incumbent to lock in their majority. They have a 53-47 edge now, and have a good chance of picking up two Democratic vacancies. Polls show Rep. W. Henson Moore (R) leading Rep. John Breaux (D) in Louisiana, where Democratic incumbent Russell B. Long is retiring. Republicans have at least a 50-50 chance of winning in Missouri, where former Republican governor Christopher (Kit) Bond is likely to face Lt. Gov. Harriet Woods for the seat being vacated by Sen. Thomas F. Eagleton.

But with Republicans facing a divisive three-way primary, Rep. Tim Wirth is favored to keep Gary Hart's Colorado seat in Democratic hands. Earlier Republican hopes that former governor Dick Snelling would beat Sen. Patrick Leahy in Vermont have faded. That makes Cranston appear the most vulnerable Democrat seeking reelection.

If the odds hold in those races and the Republicans could beat Cranston, then Democrats would have to win seven of the 22 Republican-held seats on the ballot in November in order to come out with a 51-49 edge in the Senate. That is a large order, considering that barely a dozen of those seats look at all vulnerable and that in almost all of them, the Republicans will have a substantial financial edge.

On the other hand, if Cranston can hold on here and Wirth, Woods and Breaux can hold the three Democratic vacancies, then the odds on a Democratic Senate improve dramatically.

Today, Zschau and Herschensohn are not household names even in California. By November, one of them may be very well-known indeed, and the hero or the goat of the national GOP.