Millimagnitude photometry for transiting extrasolar planetary candidates. IV. Solution to the puzzle of the extremely red OGLE-TR-82 primary