One way is to model your piles with solid elements as well. If you decide not to follow this approach then your problem is to manage capturing the boundary conditions between the piles and the soil especially when tension applies at the interfaces. Given that you want to study the dynamic behavior of a pile-soil interaction problem you will need to use some advanced numerical features. The most realistic way to go is to generate a 3D model and solve it as a contact problem. Many researchers model the soil with springs which of course is more simplistic. In your case, if you insist in coupling beams and solids, you will have to make sure that the degrees of freedom for the case of the two different dimensionality type of elements, is compatible, while the mesh of your solids should always follow the mesh of your beams (common nodes). In this case (beams and solids) you will have stiffness overlapping given that the beam elements are 1D and solid elements are 3D, thus the geometrical representation of your system will not be exact.