Optimal Solution of Integer Multicommodity Flow Problems With Application in Optical Networks