Ontology-driven Prompt Tuning for LLM-based Task and Motion Planning