New York Mayor Edward I. Koch condemned as "bestial" an attack by a group of whites on three black teen-agers leaving a supermarket where they worked. Police searched for 20 to 25 white youths in the attack Wednesday night in the Carnarsie section of Brooklyn. The attack was believed to be racially motivated, police said. Ewan Lawrence, 17, and David Smiley, 19, were treated for injuries in the attack. Michael Washington, 19, was not injured.