If you negate the prepositional phrase "in the park" the rest of the question does not make sense without the "of". What did you take pictures of? Otherwise, "what did you take pictures?" is incomplete. An alternative is to say " Of what did you take pictures in the park?" The real problem here is the translation. It just as correct to say "what did you photograph in the park?" but the people that created this lesson chose to translate "фотографувати" only as "to take pictures" and that, in my opinion, isn't as accurate as to simply say "to photograph". What did you photograph in the park?
The sense stays the same, so e.g. in mediation I'd say yes. But it's probably not literal enough for duolingo - impossible to include all the creative translations, which people make up, in the answers.
I was a bit disappointed that "What did you take a picture of in the park" was not accepted, though.