This paper deals with safe human-robot collaboration in the context of speed and separation monitoring paradigm. The core of the approach is to continuously track the separation distance between the robot and the human. The robot speed is then adjusted according to the perceived distance so that it will be able to stop before eventually come into contact with the human. We present an approach that aims at maximizing the productivity of the robot, i.e., its speed, while keeping the prescribed safety requirements satisfied. The method is based on explicit representation of danger zones -- regions around the robot, where safety requirements are violated. The motion is then generated such that the robot moves as fast as possible, while its danger zone still does not collide with human operators. The approach is validated within an experimental study.