We model the choice of transportation mode in a simplified Hotelling-like city, with a fixed number of total travellers, fixed road capacity and with no trade-off between when to travel and the time spent in a queue. A person that chooses to take her own car will inflict a congestion cost on all travellers. To get the travellers to internalise these external costs, a congestion charge has to be imposed. We derive an optimal congestion charge within in a discrete-choice framework, with a benevolent government maximising expected tax-adjusted social surplus. The congestion charge to be imposed on private driving, beyond the opportunity cost - equal to the fare on public transportation - is shown to be a weighted average of a Ramsey-like term (capturing the goal to raise public revenue) and a Pigou-term capturing the environmental cost of a person's private driving. This property is similar to the optimal environmental tax derived by Sandmo (1975). However, the behavioural assumption underlying the present framework is quite different from the standard theory of consumer choice adopted by Sandmo.