You can delete the files in those directories first and then the dir itself with
<Target Name="SomeTarget">
<ItemGroup>
<FilesToDelete Include="Path\To\Obj\**\*"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<RemoveDir Directories="Path\To\Obj\" />
</Target>