A new Gallup analysis of more than 8,000 interviews compiled over the past three months finds that every major state in the country is up for grabs in the 1988 presidential race.

Despite speculation of a GOP "presidential lock" based on voting patterns of the past 20 years, Democrat Michael Dukakis seems able to challenge Republican George Bush in states that have consistently gone Republican. Voter opinions of the candidates, however, are such that Bush could easily rebound in traditional GOP strongholds as the campaign progresses.

Proponents of the GOP lock theory find support for their ideas in recent electoral history. In 23 of the 50 states _ comprising 202 of the 270 electoral votes needed to win in 1988 _ the Democratic ticket has lost five straight presidential contests. Lyndon Johnson, winner in a landslide over Barry Goldwater in 1964, is the last Democratic presidential candidate to capture any of the states so defined as GOP lock states.

For a number of reasons, the GOP lock may not hold in 1988. In some states and regions where Ronald Reagan won big victories in 1984, he is not especially popular today. In other places, the president has maintained high approval ratings, but they are not translating into a Bush lead over Dukakis.

While it is early and voters may yet return to their Republican voting habits in November, the Democratic governor from Massachusetts shows the potential to capture many states that have eluded other recent Democratic presidential candidates.

Geographically, most of the GOP lock states are found west of the Mississippi River. The Republican Party has so dominated recent presidential voting in the Rocky Mountain and Pacific states that the Democrats have carried only Hawaii (three times) and Washington (once) in the past five elections.

But from the Rockies to the Pacific, Bush's support in Gallup's early voter surveys falls far short of Ronald Reagan's vote totals in 1980 and 1984. Dukakis leads by 51 percent to 40 percent overall among voters who live in the eight Rocky Mountain states. In no other region is the gap between Reagan approval and Bush support so large _ 58 percent of Rocky Mountain voters approve of Reagan's job performance but only 40 percent prefer Bush over Dukakis.

Since early voter preferences in the region are unusually "soft" _ only one in five voters strongly supports either candidate _ Bush has ample opportunity to recover. But hard times in the energy-based economies of these states during the Reagan years may help Dukakis' chances in the region. Colorado and New Mexico are reported to be targets of the Dukakis campaign.

Two New England states _ Vermont and New Hampshire _ have been in the GOP column consistently. As the governor of a neighboring state, Dukakis is given a good chance of carrying Vermont. While New Hampshire is more staunchly Republican, Dukakis' regional appeal gives the Democrats at least an outside chance of winning there.

Among all New England voters with the exception of those in Dukakis' Massachusetts, the race is about even _ Dukakis 48 percent vs. Bush 44 percent. (Bush has a summer home in Maine and spent most of his youth in Connecticut.)

New Jersey's 16 electoral votes have reliably gone Republican, but Dukakis has an early lead in the Garden State (51 percent vs. 38 percent). That state has a high proportion of Catholic voters, and Dukakis' ethnicity and his campaign's emphasis on his immigrant parents may play well there.

Only one Southern state, Virginia, is technically a GOP lock state, but recent political trends have strengthened the Republican Party in a region once dominated by Democrats. In the end, Dukakis may find it more difficult to win in this socially conservative region than in most of the so-called GOP lock states. Bush's support is widest and deepest in the South, and the president's approval rating has held up well in the region.

Although Gallup's early polling has the two men statistically tied in the Southeast and Southwest, Dukakis' gains in the South have been minimal following the selection of Sen. Lloyd Bentsen of Texas as his running mate and his party's convention in Atlanta. Bush, who will no doubt press the view that Dukakis is too liberal, has the opportunity to regain his momentum at this month's GOP convention in New Orleans.

In selecting a running mate, voter preferences suggest that Bush should select someone like himself _ who has Washington experience _ rather than make his choice of the basis of ideology or appeal to a certain type of voter, according to a Gallop poll. Thirty-nine percent of voters say they would be more likely to support Bush if he chose a running mate who "has Washington experience and knows how to make the current system work."