We discuss the possible simultaneously ultraviolet (UV)/optical emission accompanying gamma-ray bursts (GRBs). We show that as long as the intrinsic spectrum of GRBs can extend to ∼10 GeV or higher, there are large amounts of relativistic e± pairs generated due to the annihilation of soft gamma-rays with very energetic photons, which dominates over the electrons/positrons associated with the fireball, whether the fireball is highly magnetized or not (for the highly magnetized fireball, the magnetic field is ordered, high linear polarization of multiwavelength emission is expected). We find that these e± pairs can power a UV flash with m≃ 12–13 mag, and the corresponding optical emission can be up to mR≃ 15–16 mag. Such bright UV emission will be able to be detected by the satellite Swift, planned for launch in 2004. The behaviour of the optical–UV spectrum (Fν∝ν5/2) differs significantly from that of the reverse shock emission (Fν∝ν−β/2, β≃ 2.2), which is a signature of the emission accompanying the GRB. Mild optical emission can be detected with the ROTSE-IIIa telescope system, if the response to the GRB alert is fast enough.