The backyard of my house has a small slope and because of that little puddles of rain water are accumulating. Because of this, the mulch in the nearby vegetable beds are wet all the time. I want to fill this slope with some dirt. I would like to know what kind of dirt is best suited for this so that it will help the vegetable beds as well.
The problem sounds more like one of drainage. Water is draining to the lowest part of the garden where your vegetables are. The way the water drains depends on the level of compaction in the soil, so if you reduce the gradient by back filling, you're still not solving the problem except by placing the pool of water deeper to where you plant your vegetables.
I'd suggest in the first instance you dig a drain to divert the water away from your vegetables, and if that works, put in a more permanent field drain. Once the drainage issue is fixed, you can use whatever good quality soil you like to level the garden.
Good quality topsoil is probably best, preferably with some organic or humus rich composted materials added (composted animal manures, leaf mould, spent mushroom compost, garden compost, anything like that), though the latter component should only be added if you're not growing root crops like carrots, which will fork badly in manured or very rich soil.
Depending on the gradient of the slope and the size of the area, you may need a surprising amount of topsoil to make it level though, so that should be worked out beforehand.
For vegetable garden box, along with the soil, I used a combination of steer manure and chicken feed as fertilizer last year and had good results. 3 parts steer manure and 1 part chicken feed did it for me. You should include fertilizer in your consideration since you are planning to grow vegetables.