Building Domain-Specific Small Language Models via Guided Data Generation