Yes, you can visit Omkareshwar and Mahakaleshwar temples on the same day, if you don’t waste your time in the town then it is possible.
Suggested Itinerary is listed below-:
07:30 AM-: Reach Ujjain
08:30 AM-: After taking bath to reach Mahakaleshwar temple
11:00 AM-: Leave for Mahakaleshwar
15:00 PM-: Reach Omkareshwar
18:00 PM-: Leave Omkareshwar and start moving towards Khandwa
20:00 PM-: Reach Khandwa Railway station.
21:45 PM-: Catch Punjab Mail for Nasik.
Next day you’ll reach Nasik around 05:00 A. Take a city bus to MSRTC CBS. You’ll get a bus for Trimbakeshwar.