The correct answer is D. Nonfiction can contain facts, opinions, and ideas.
Nonfiction, as the name itself says, is not fiction - this means that the authors writing nonfiction usually use real life events, facts, and ideas, when writing their works. These works are encyclopedias, essays, manuals, etc.
A is incorrect because it is quite the opposite - nonfiction deals with real people and events. B is incorrect because short stories are fiction rather than nonfiction. C is incorrect because that's not the only purpose of nonfiction - it can also educate, inform, etc.