The $T$ gate applies a phase of $e^{\pi i / 4}$ to $|1\rangle$, i.e., it has the following effect: $T(\alpha|0\rangle + \beta|1\rangle) = \alpha|0\rangle + e^{\pi i / 4}\beta|1\rangle$. We want this effect to be applied when one of the qubits is in $|1\rangle$, but not both. Therefore, we need a way to distinction these two states.
We can use the $\mathrm{CNOT}$ gate to differentiate these two states from the rest. To do this, apply a $\mathrm{CNOT}$ gate with the first qubit as control and the second as target. This will leave $|00\rangle$ and $|01\rangle$ unaffected, $|10\rangle$ turns into $|11\rangle$ and $|11\rangle$ into $|10\rangle$. In other words, it will set the second qubit to $|1\rangle$ if and only if one qubit but not both were in the $|1\rangle$ state.
The states we want to apply the $\pi / 4$ phase to are now mapped to the states with $|1\rangle$ in the second qubit. Thus, we can apply the $T$ gate to the second qubit, changing $|01\rangle$ into $e^{\pi i / 4}|01\rangle$ and $|11\rangle$ into $e^{\pi i / 4}|11\rangle$.
Now we only have to map back to our original states, which can be easily done with a $\mathrm{CNOT}$ gate just as the first one.
Put into a Qiskit circuit, this look as follows.
from qiskit import QuantumCircuit
from qiskit.quantum_info import Operator
qc = QuantumCircuit(2)
qc.cx(0, 1)
qc.t(1)
qc.cx(0, 1)
print(qc)
print(np.round(Operator(qc).data, 5))
Which gives the circuit and unitary:
q_0: ──■─────────■──
┌─┴─┐┌───┐┌─┴─┐
q_1: ┤ X ├┤ T ├┤ X ├
└───┘└───┘└───┘
[[1. +0.j 0. +0.j 0. +0.j 0. +0.j ]
[0. +0.j 0.70711+0.70711j 0. +0.j 0. +0.j ]
[0. +0.j 0. +0.j 0.70711+0.70711j 0. +0.j ]
[0. +0.j 0. +0.j 0. +0.j 1. +0.j ]]