Is it ok for a Buddhist to participate in a demonstration? I'm talking about a peaceful demonstration against a corrupt government. The point is: It can be seen as divisive speech because there will be people against it.
The Buddha himself protested silently on at least two occasions in the Dhp commentary; both relate to his family, though. He never seems to have protested against the cruelty of kings, etc. and his actions seem always to have been in the form of teaching. 

A protest is always a showing that you are against something. If you are truly against it, this is paṭigha, or aversion, and it is always unwholesome. In Buddhism we look at the bigger picture, and try to see that samsara as a whole is meaningless. As such, we try to teach all people to give up their unwholesomeness - this means teaching all rather than taking sides. The Buddha was exemplary in this regard, teaching even the basest of human beings and never challenging evil directly.

If the protest is instructional - i.e. a means of reminding certain parties of the error of their ways, then it seems to be reasonable, provided one is an involved party (e.g. a relative or intimate to one party in a conflict).

Finally, one might argue a civic responsibility for lay people - e.g. voting, or even demonstrating simply as a duty (e.g. H. D. Thoreau's Civil Disobedience). As long as one simply sees it as a duty, this seems reasonable.