Scotland's resident doctors have voted for a strike in January, but the health secretary says they have been offered the best pay deal possible.