You are thinking of TRON, the arcade game built around the 1982 film.
The light cycle segment is the part everyone remembers: two bikes racing across a grid, leaving solid trails behind them, and the loser is the one who hits a wall. That duel structure is exactly the "you versus someone on a motorcycle" image you described.
TRON was actually a collection of four subgames drawn from the film, with the light cycle grid alongside disc combat and a tank section. The cycles were the standout, which is why the whole game tends to be remembered as the bike one.
It was later reimagined in Tron 2.0 and the light cycle sequence returned in Tron: Evolution if you want a modern version.