To my knowledge, the usage of "a" and "an" before a word is determined by the vowel sound and not the spelling. This is why we use "an' before "honest" since the pronunciation of the first syllable of "honest" is a vowel sound. Similarly, FOR INDIVIDUAL LETTERS, we use "an" before A, E, F, H, I, L, M, N, O, R, S, X. For example, is there an MTR station nearby? WOULD SOMEBODY POINT OUT MY MISTAKES.
For the answer to the question, B is definitely out. It seems that C and D are ok, but I prefer D. Hope some experts will clarify more.