Junior doctors 'working dangerously long hours'