for weak acids
pH=pka + log (A-)/(HA) aka henderson hasselbach equation
if you solve this, you'll get that pH - pka = log(A-)/(HA)
and then again you will get 10 to power ph - pka = A-/HA. [Refer to link in comments]
now considering that the ph of our body is 7.3 something,
we can solve for pka 10 and pka 6 using this formula.
That is for pka 6 and body ph 7.3, it will be 10 to the power of 1.3, would mean that A/HA ratio is a positive number, implying that A- > HA.
whereas for when pka is 10, the A-/HA ration is 10 to power of -2.7, meaning that HA>A-.
And as already mentioned in the above comments, we need an iconic form, to eliminate the drug, it would be preferred if the pka is 6 as in that case, A-(ionic) would be in more concentration.