Controlled Automatic Task-Specific Synthetic Data Generation for Hallucination Detection