We investigate the navigation problem in lattices with long-range connections and subject to a cost constraint. Our network is built from a regular two-dimensional (d=2) square lattice to be improved by adding long-range connections (shortcuts) with probability Pij∼rij-α, where rij is the Manhattan distance between sites i and j, and α is a variable exponent. We introduce a cost constraint on the total length of the additional links and find optimal transport in the system for α=d+1 established here for d=1 and d=2. Remarkably, this condition remains optimal, regardless of the strategy used for navigation, being based on local or global knowledge of the network structure, in sharp contrast with the results obtained for unconstrained navigation using global or local information, where the optimal conditions are α=0 and α=d, respectively. The validity of our results is supported by data on the U.S. airport network.