Both are acceptable, but they do not mean the same thing. “On time” means punctually. For example, if a train that is scheduled to arrive at 10 o’clock arrives exactly at 10, you can say, “The train arrived on time”. Of course this seldom happens in our country, and perhaps this is one of the reasons why we are confused between “in time” and “on time”. When you are “in time” for something, you arrive a few minutes early. If you arrive at the station at 9:57 for the train that arrives at 10, then you are “in time” to meet the train. If, on the other hand, you arrive at the station at eight o’clock, then you cannot say that you are “in time”. In this context, you normally say, “I am very early”. If you arrive at 10.01, you are “late”.