House prices rose for the third time in four months during June as the market was boosted by a shortage of properties being put up for sale, figures showed.