What are near-minimal pairs? How are they different from minimal pairs? Can Allophones occur in near-minimal pairs?
Sure. English "hit" and "hot" are near-minimal pairs, differing only in one phoneme, but the
/h/ is realized differently because of that (more like
[ç] in the first one).
It's not always possible to find a true minimal pair to distinguish phonemes, so near-minimal pairs can sometimes be necessary. You just need to make sure that whatever differs between them isn't likely to be causing allophony.
A minimal pair is two distinct utterances which differ in the presence of exactly one surface phone, for example [væt] and [fæt]. The premise is that you first take note of various words as they are actually pronounced, so you have a record of the phones in the language. If you have a minimal pair, you have compelling evidence that the two phones derive from distinct phonemes, and are not allophones of a single phoneme.
A near-minimal pair is a pair of words which differ in more than one set of phones, where the number of differing phones is at least two, and hopefully not more than two. Near-minimal pairs are sometimes called on in cases where there are few or no minimal pairs to demonstrate the phonemic status of a phonic difference.
There is often chicken-egg confusion over the status of minimal pair in phonology. One does not know what the phonemes of a language are until one has performed a distributional analysis of phonetic segments, and that analysis can tell you that phonetic sounds X and Y are in complementary distribution (meaning that they can be treated as allophones of a single phoneme), or that X and Y are not in complementary distribution (are not allophones of a single phoneme). This then (supposedly) justifies positing certain allophonic rules, if the sounds have the requisite distribution. Sometimes, the evidence for complementary distribution is almost good enough, which is where near-minimal pairs become important (they can be used to establish phonemic contrast).
The crucial thing to remember is that one looks for minimal pairs in the phonetic record: it is not a hybrid of looking in the phonetic record but also looking at the abstract underlying form.
Everything that occurs in the phonetic record is an allophone (or, a phone). Allophone refers to the relation between a surface phone and whatever phoneme is is abstractly. [s] is an allophone of /s/, [p] and [pʰ] are allophones of /p/. The boring case is where a phoneme has only one allophone (pretty rare, actually). "Near minimal pair" is about the phonetic record, so it is always a relation between phones i.e. allophones. The reason for confusion over what a minimal pair is, is that this kind of automated distributional analysis has fallen out of favor, even though we retain the old terminology.