Can I use two 2x8 beams instead of one 4x8 beam for deck?
If you pair the beams up, you should glue them with construction adhesive. Just nailing or screwing them together won't really distribute the load across both beams. Although; you're probably not planning on hanging or resting anything on just one beam and expecting the other beam to help with the load anyway.

A pair of 2x8 beams are going to be 3" wide (typically 1/4" is planed off each side of dimensioned lumber to give it the finished surface).

A 4x8 beam is going to be 3-1/2" wide. The extra half inch is going to add some strength to the 4x8 beam.

The 4x8 might be more prone to warping than a couple of 2x8's if it's a solid beam (but not if it's a laminated beam).

If this was for indoor use, you could sandwich a strip of plywood between the 2x8 beams and glue (not nail) all three pieces together to create a laminated beam that would be stronger and less prone to warping than the 4x8. But since you're building a deck, the sandwiched plywood would soak up water and be a problem.