This is probably illegal (garnishing for mistakes), so check with you local labour laws before doing this. Though I would recommend against this unless you want employees quitting or stealing from you.
Even if you just bonus and don't penalize, if you do it often and regular, it becomes an expectred portion of compensation, and the lack of the bonus becomes the penalty. It does require skipping or reducing the next round of raises in lieu of the bonus structure though, unless you are fine with just paying out more money to employees to reduce problems (which for some people and/or some situations is fine).