Yes, it is okay to write more than the number of words required. Do not write less than the number of words needed, as you will be penalized and deducted marks. However, note that writing more than what is required does not mean higher marks. It is the content that matters, after all. For that reason, you should stop writing when you have reached the limit AND written a satisfactory conclusion.