If you're talking about using the current Nintendo Wi-Fi (I'm not sure what they call it) for older games like Pokemon D/P/Pt, HG/SS, B/W, and B2/W2 you cannot. However, if you are talking about using local wireless connection to battle and trade with older games, then yes, you can.
Hope this helps!
Source:
Knowledge