I suspect it is not optional, but I'm not sure. Even though we say in English, "I don't know," that's a very strange sentence. For all practical purposes, "know" is a transitive verb. Consider what it would mean not to know. That would be brain dead, literally. Otherwise, it makes sense only if we are talking about knowing or not knowing something.