Almost 400 short-term prisoners in Scotland could be released early in the new year under Scottish government plans to ease pressure on the country's prisons.