axion couplings As I understand it, the axion $a$ originates from the spontaenous symmetry breaking of  $U(1)_{PQ}$. This symmetry being anomalous, and because of the QCD vacuum structure, a non vanishing term like $\frac{a}{f_a}Tr( G \tilde{G})$ is included in the Lagrangian, where $G$ is the gluon field strenght. This determines the axion couplings to gluons.
Talking about a coupling to photons would mean to consider a term like $\frac{a}{f_a} F \tilde{F}$, where $F$ is the QED field strenght. I thought a term like
$ F \tilde{F}$ could be expressed as a vanishing total derivative, unlike $Tr( G \tilde{G})$, so why are we talking about axion couplings to photons ?
 A: The simple answer to your question will be to just say that this is due to the non-perturbative effects of the QCD vacuum.
As you rightly said in QED, the term $F\cdot \tilde{F}$ doesn't contribute anything - since it is a total divergence, hence no observable consequence in equation of motion simply because this surface term vanishes at spatial infinity. However, the term $G\cdot \tilde{G}$ is not the same as $F\cdot \tilde{F}$ because of the topological structure of the QCD vacuum. The non-perturbative nature of QCD makes the QCD vacuum very interesting because of `instanton' solutions. These instantons cause transformation among degenerate vacua. This in turn leads to the fact the $G\cdot \tilde{G}$ term does not vanish at spatial infinity. You can read more about the QCD vacuum and axions in a review by R. Peccei here http://arxiv.org/abs/hep-ph/0607268
Coming to your actual question, the axion couples to the two photons via the triangle diagram (with fermions carrying Peccei-Quinn charge in the loop) - this is essential because the axion is born of out an anomalous global $U(1)_{PQ}$ symmetry. The axion, in fact, gains mass via another triangle diagram i.e. coupling to gluon fields.
There are two axion models which by construction have variation in the axion couplings but the triangle diagram with two photons holds in both the models since it is essential for the postulated anomalous 
symmetry.
