Transition from smooth sliding to stick-slip motion in a single frictional contact