If he ______ forgotten his wallet, he could have paid for the dinner.
Correct: A
This is a Third Conditional sentence with a negative condition. The main clause 'he could have paid' indicates a past hypothetical result, so the 'if' clause requires the past perfect negative tense, which is 'hadn't forgotten'.