We address the problem of how to increase the speed of movements that occur in contact with the environment, where the initial movements were acquired by kinesthetic guiding. We take into account dynamic capabilities and constrains of both the robot and the environment. This leads to a modified, non-uniformly accelerated motion. To enable the non-uniform modulation of the movement policy, we encode the initial control policy using an extended formulation of dynamic movement primitives. The initial policy is improved using feedback error adaptation, ILC-based learning or reinforcement learning. We propose a new policy learning algorithm which takes into account intermediate rewards during the policy learning. The proposed approach was experimentally evaluated on a bi-manual kitchen task, where the robot, composed of two KUKA LWR arms, had to assemble a cake decoration tool.