TLDR: either had seen and saw might be correct, depending on context.
Google books finds the following quote in
Tense in English: Its Structure and Use in Discourse, by Renaat Declerck,
Consider now
(175) (a) Bill was in London when Jenny was in Paris.
(b) I explained that Bill had been in London when Jenny was in Paris.
Examples like these show that the tense form of a direct speech when-clause is not normally backshifted in indirect speech.
The book goes on to explain that there is an exception to this — narrative when-clauses, where the when is backshifted. Is this a narrative when-clause? How do you tell them apart? The book says "Narrative when-clauses do not in fact answer the question when? It gives as example:
They said that they had been sitting in the kitchen when all of a sudden Bill had recited that poem.
So is the OP's clause a narrative when-clause? I think it depends on the context. It certainly could be viewed as answering the question "when did you see the accident," in which case it should be saw. But it also could be viewed as part of a story that the narrator is telling, in which case had seen would also work.