If I understand you correctly, you have 4 regressors: A1, A2, B1, and B2. Then the main effect of those 4 types of stimuli would be automatically in the output from '-fout ... prefixname'.
Assume you run 3dDeconvolve with -polort 1. Yes, to test whether (A1+A2) - (B1+B2) = 0, (A1+B1) - (A2+B2) = 0, and (A1-A2) - (B1-B2) = 0, go with the following respectively:
0 0 1 -1 1 -1
0 0 1 -1 1 -1
0 0 1 -1 -1 1
Gang