We consider a real-world multimodal freight transportation problem that arises in a food grain organization in India. This problem aims to satisfy the demand for a set of warehouses for different types of food grains from another set of warehouses with surplus quantities over multiple periods of time by rail and road, while minimizing the total cost of transportation. We first present some examples that show that the existing method can lead to suboptimal solutions. Motivated by the need to efficiently solve such an important problem, we propose an integer programming formulation for this problem and solve it using state-of-art solvers. We highlight that the use of the proposed mathematical model gives significant cost savings over the existing method. Our computational experiments on real instances from historical data show that the proposed model is effective for such instances and could solve them optimally in a reasonably short time (less than a minute). Moreover, our results show that this model is also suitable for much larger instances. We also analyze the effects of changes in model parameters on the size of the proposed mathematical model. We emphasize that the proposed model can be easily adapted to other multimodal freight transportation problems that arise in different industries.