Profinite completions of some groups acting on trees