Yes you can. One day is more tham enough for Kanyakumari, and so is for Rameswaram. You can then head directly to rameswaram and then madurai. There is more to explore in Madhurai. Plan accordingly so that you can make proper arrangements for travel and stay.