I think a lot depends on the professor.

I took an introductory chemistry class in college. At some point, the professor said we could write an essay for extra credit. I thought that the essay topics were all kind of fluffy, so I asked her if I could write about a topic in nuclear chemistry instead. I told her what I wanted to put into the essay and she gave me a green light. It was great!