A £15bn merger between two of the UK's biggest mobile networks could get the green light - if they stick to their commitments to invest in the country's infrastructure, the competition watchdog has said.