FOR the first time, NASA yesterday grounded two astronauts for violations of its safety rules. One astronaut was involved in a fatal collision of stunt planes at an air show in central Texas last weekend. The two astronatuts are veteran shuttle crew commanders. ''It's the first time we've ever replaced members of a crew for disciplinary reasons, '' said Jeffrey E. Carr, a spokesman at the Johnson Space Center of the National Aeronautics and Space Administration.
The groundings will only slightly shrink the astronaut corps, which currently has 85 members.
The two grounded astronauts are Comdr. Robert L. (Hoot) Gibson and Capt. David M. Walker, both of the Navy. They were grounded for violations of Johnson Space Center flight crew operations guidelines, Mr. Carr said. Commander Gibson was grounded for one year and Captain Walker for 60 days.
Commander Gibson, 43 years old, piloted an eight-day Challenger mission in 1984 and commanded the 1986 Columbia mission and the December 1988 Atlantis mission.
Captain Walker, 46, piloted the November 1984 flight of Discovery and commanded the space shuttle Atlantis during a four-day flight in May 1989.
Pilot Killed in Race
NASA said Commander Gibson was removed from shuttle flight assignments and from T-38 jet trainer flight status for one year for violating a policy that limits high-risk recreational activities for astronauts named to shuttle flight crews. Commander Gibson's stunt plane collided with another plane during a race on Saturday, sending the second craft hurtling into a cornfield and killing its pilot, Henry W. Jones Jr., 69, a retired fighter pilot from Newport News, Va.
Commander Gibson landed his plane safely at the New Braunfels Municipal Airport, 25 miles northeast of San Antonio.
The policy of limiting high-risk activity, said Donald R. Puddy, NASA's director of flight crew operations, is ''intended to preserve our crews as assigned and apply regardless of the time prior to launch, '' adding, ''The race was a clear violation of the policy.''
Commander Gibson had been scheduled to command a shuttle mission in 1992, but he will be unable to train for it because of the suspension. NASA said it would name a replacement in the near future. Captain Walker was suspended for a number of infractions of NASA aircraft operating guidlines, said Mr. Carr. They included a May 1989 incident in which the pilot of a Pan Am Airbus 310 reported a ''near mid-air collision'' between his aircraft and a T-38 jet flown by Captain Walker.
Captain Walker had been scheduled to command a Department of Defense mission in March 1991. He has been replaced on the flight and suspended from T-38 flight status, NASA said. His replacement will be Col. Frederick D. Gregory of the Air Force, a veteran of two shuttle flights.
''We hire test pilots because they have the ability to fly on the edge, '' said Mr. Carr. ''We want that. But we want them to be conservative about it.''