In the Arduino IDE you can use the tools -> programmer menu. Set it to USBasp and you're ready to go
You can then burn a bootloader (menu tools->bootloader) into the Atmel chip.
You can put a sketch into the Atmel chip using the File->upload sketch using programmer menu.
You can also use AVRDude. I use AVRdudess as a graphical frontend. Select "Any usbasp programmer with correct VID/PID" as Programmer -c.
You then can read fuse settings, read chip ID and upload images.
I do not have Atmet studio 4 at hand, but in Atmel studio 6, you configure it to use avrdude, with the correct programmer.
Use the Tools->External tools menu to add a tool. Fill in the dialog and press ok. Now you have a extra menu in the tools menu, for programming.